Skip to content

test(ws): refactor lifecycle hooks to use dynamic ports and separate afterEach - #8367

Merged
BridgeAR merged 3 commits into
masterfrom
rochdev/test-ws-hook-refactor
May 9, 2026
Merged

test(ws): refactor lifecycle hooks to use dynamic ports and separate afterEach#8367
BridgeAR merged 3 commits into
masterfrom
rochdev/test-ws-hook-refactor

Conversation

@rochdev

@rochdev rochdev commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace hardcoded ports (6015, 16015) with port: 0 so the kernel assigns an available port, eliminating inter-run conflicts
  • Move regression-test resource cleanup (server, socket) from test bodies into dedicated afterEach hooks
  • Split combined afterEach callbacks into one hook per concern so a failure in one cleanup step doesn't prevent others from running
  • Load/close the agent in beforeEach/afterEach instead of before/after so each test gets a clean agent state
  • Move dc.channel(...) declaration to the top of the file

Test plan

  • PLUGINS=ws npm run test:plugins passes

Generated by Claude Code

…afterEach

- Replace hardcoded ports (6015, 16015) with port 0 so the kernel
  assigns an available port, eliminating inter-run port conflicts
- Move regression-test resource cleanup (server, socket) from test
  bodies into dedicated afterEach hooks
- Split combined afterEach callbacks into one hook per concern so a
  failure in one cleanup step doesn't skip the others
- Load/close the agent in beforeEach/afterEach instead of before/after
  so each test gets a clean agent state

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.96%. Comparing base (a3bb4cd) to head (bb58141).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8367      +/-   ##
==========================================
- Coverage   89.96%   89.96%   -0.01%     
==========================================
  Files         836      836              
  Lines       44867    44867              
  Branches     8320     8321       +1     
==========================================
- Hits        40366    40364       -2     
- Misses       4501     4503       +2     
Flag Coverage Δ
aiguard-integration-active 40.53% <ø> (ø)
aiguard-integration-latest 40.48% <ø> (ø)
aiguard-integration-maintenance 40.53% <ø> (ø)
aiguard-macos 35.23% <ø> (-0.09%) ⬇️
aiguard-ubuntu 35.33% <ø> (-0.09%) ⬇️
aiguard-windows 35.14% <ø> (-0.09%) ⬇️
apm-capabilities-tracing-macos 49.03% <ø> (+0.04%) ⬆️
apm-capabilities-tracing-ubuntu-active 49.05% <ø> (-0.01%) ⬇️
apm-capabilities-tracing-ubuntu-latest 49.03% <ø> (ø)
apm-capabilities-tracing-ubuntu-maintenance 49.24% <ø> (ø)
apm-capabilities-tracing-ubuntu-oldest 49.22% <ø> (+0.17%) ⬆️
apm-capabilities-tracing-windows 48.86% <ø> (-0.18%) ⬇️
apm-integrations-aerospike-18-gte.5.2.0 34.27% <ø> (-0.09%) ⬇️
apm-integrations-aerospike-20-gte.5.5.0 34.28% <ø> (-0.09%) ⬇️
apm-integrations-aerospike-22-gte.5.12.1 34.28% <ø> (-0.09%) ⬇️
apm-integrations-aerospike-22-gte.6.0.0 34.28% <ø> (-0.09%) ⬇️
apm-integrations-aerospike-eol- 34.19% <ø> (-0.09%) ⬇️
apm-integrations-child-process 35.25% <ø> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-18 41.09% <ø> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-20 41.11% <ø> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-22 41.11% <ø> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-24 41.04% <ø> (-0.09%) ⬇️
apm-integrations-couchbase-18 34.59% <ø> (+0.05%) ⬆️
apm-integrations-couchbase-eol 34.48% <ø> (-0.31%) ⬇️
apm-integrations-dns 34.13% <ø> (-0.09%) ⬇️
apm-integrations-elasticsearch 34.93% <ø> (-0.08%) ⬇️
apm-integrations-http-latest 42.08% <ø> (-0.08%) ⬇️
apm-integrations-http-maintenance 42.14% <ø> (-0.08%) ⬇️
apm-integrations-http-oldest 42.14% <ø> (-0.08%) ⬇️
apm-integrations-http2 39.45% <ø> (-0.09%) ⬇️
apm-integrations-kafkajs-latest 40.98% <ø> (-0.09%) ⬇️
apm-integrations-kafkajs-oldest 41.03% <ø> (-0.09%) ⬇️
apm-integrations-net 34.82% <ø> (-0.09%) ⬇️
apm-integrations-next-11.1.4 29.03% <ø> (-0.10%) ⬇️
apm-integrations-next-13.2.0 30.72% <ø> (-0.08%) ⬇️
apm-integrations-next-gte.10.2.0.and.lt.11 22.99% <ø> (ø)
apm-integrations-next-gte.11.0.0.and.lt.13 30.73% <ø> (-0.08%) ⬇️
apm-integrations-next-gte.13.0.0.and.lt.14 30.97% <ø> (-0.08%) ⬇️
apm-integrations-next-gte.14.0.0.and.lte.14.2.6 30.79% <ø> (-0.08%) ⬇️
apm-integrations-next-gte.14.2.7.and.lt.15 30.79% <ø> (-0.08%) ⬇️
apm-integrations-next-gte.15.0.0 30.86% <ø> (-0.08%) ⬇️
apm-integrations-oracledb 34.57% <ø> (-0.09%) ⬇️
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 34.95% <ø> (-0.08%) ⬇️
apm-integrations-prisma-latest-all 35.36% <ø> (-0.08%) ⬇️
apm-integrations-restify 36.32% <ø> (-0.09%) ⬇️
apm-integrations-sharedb 33.81% <ø> (-0.09%) ⬇️
apm-integrations-tedious 34.37% <ø> (-0.09%) ⬇️
appsec-express 51.91% <ø> (-0.07%) ⬇️
appsec-fastify 48.62% <ø> (-0.07%) ⬇️
appsec-graphql 49.00% <ø> (+0.04%) ⬆️
appsec-integration-active 36.90% <ø> (ø)
appsec-integration-latest 36.88% <ø> (ø)
appsec-integration-maintenance 36.90% <ø> (ø)
appsec-integration-oldest 36.89% <ø> (ø)
appsec-kafka 41.44% <ø> (-0.02%) ⬇️
appsec-ldapjs 40.65% <ø> (-0.07%) ⬇️
appsec-lodash 40.76% <ø> (-0.07%) ⬇️
appsec-macos 55.75% <ø> (-0.06%) ⬇️
appsec-mongodb-core 45.10% <ø> (-0.06%) ⬇️
appsec-mongoose 45.95% <ø> (-0.07%) ⬇️
appsec-mysql 47.99% <ø> (-0.02%) ⬇️
appsec-next-latest-11.1.4 29.15% <ø> (-0.08%) ⬇️
appsec-next-latest-13.2.0 30.86% <ø> (-0.09%) ⬇️
appsec-next-latest-gte.10.2.0.and.lt.11 28.66% <ø> (ø)
appsec-next-latest-gte.11.0.0.and.lt.13 30.84% <ø> (-0.09%) ⬇️
appsec-next-latest-gte.13.0.0.and.lt.14 31.09% <ø> (-0.09%) ⬇️
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 30.93% <ø> (-0.09%) ⬇️
appsec-next-latest-gte.14.2.7.and.lt.15 30.93% <ø> (-0.09%) ⬇️
appsec-next-latest-gte.15.0.0 30.93% <ø> (-0.09%) ⬇️
appsec-next-oldest-11.1.4 29.22% <ø> (-0.02%) ⬇️
appsec-next-oldest-13.2.0 31.14% <ø> (-0.09%) ⬇️
appsec-next-oldest-gte.10.2.0.and.lt.11 28.78% <ø> (ø)
appsec-next-oldest-gte.11.0.0.and.lt.13 30.86% <ø> (-0.09%) ⬇️
appsec-next-oldest-gte.13.0.0.and.lt.14 31.33% <ø> (-0.08%) ⬇️
appsec-next-oldest-gte.14.0.0.and.lte.14.2.6 31.17% <ø> (-0.09%) ⬇️
appsec-next-oldest-gte.14.2.7.and.lt.15 31.17% <ø> (-0.09%) ⬇️
appsec-next-oldest-gte.15.0.0 31.17% <ø> (-0.09%) ⬇️
appsec-node-serialize 39.97% <ø> (-0.07%) ⬇️
appsec-passport 43.63% <ø> (-0.08%) ⬇️
appsec-postgres 47.54% <ø> (-0.07%) ⬇️
appsec-sourcing 39.31% <ø> (-0.07%) ⬇️
appsec-stripe 41.41% <ø> (-0.08%) ⬇️
appsec-template 40.13% <ø> (-0.07%) ⬇️
appsec-ubuntu 55.83% <ø> (-0.07%) ⬇️
appsec-windows 55.66% <ø> (-0.09%) ⬇️
debugger-ubuntu-active 43.17% <ø> (ø)
debugger-ubuntu-latest 43.12% <ø> (ø)
debugger-ubuntu-maintenance 43.18% <ø> (ø)
debugger-ubuntu-oldest 43.62% <ø> (ø)
instrumentations-instrumentation-bluebird 29.25% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-body-parser 36.86% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-child_process 34.74% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-cookie-parser 31.09% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-express 31.31% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.21% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-express-session 36.55% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-fs 28.94% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-generic-pool 29.86% <ø> (ø)
instrumentations-instrumentation-http 36.22% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-knex 29.22% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-light-my-request 36.48% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-mongoose 30.35% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-multer 36.65% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-mysql2 34.77% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport 40.27% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.05% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-local 40.53% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-pg 34.32% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-promise 29.19% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-promise-js 29.19% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-q 29.22% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-url 29.19% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-when 29.21% <ø> (-0.09%) ⬇️
instrumentations-integration-esbuild-active 19.30% <ø> (ø)
instrumentations-integration-esbuild-latest 19.29% <ø> (ø)
instrumentations-integration-esbuild-maintenance 19.30% <ø> (ø)
instrumentations-integration-esbuild-oldest 19.29% <ø> (ø)
llmobs-ai 37.69% <ø> (-0.08%) ⬇️
llmobs-anthropic 37.75% <ø> (-0.08%) ⬇️
llmobs-bedrock 36.45% <ø> (-0.08%) ⬇️
llmobs-google-genai 36.70% <ø> (-0.15%) ⬇️
llmobs-langchain 36.48% <ø> (-0.07%) ⬇️
llmobs-openai 40.52% <ø> (-0.08%) ⬇️
llmobs-sdk-active 45.33% <ø> (-0.09%) ⬇️
llmobs-sdk-latest 45.26% <ø> (-0.09%) ⬇️
llmobs-sdk-maintenance 45.33% <ø> (-0.09%) ⬇️
llmobs-sdk-oldest 45.31% <ø> (-0.09%) ⬇️
llmobs-vertex-ai 36.92% <ø> (-0.08%) ⬇️
openfeature-macos 37.90% <ø> (ø)
openfeature-ubuntu 37.98% <ø> (ø)
openfeature-unit-active 48.51% <ø> (ø)
openfeature-unit-latest 48.35% <ø> (ø)
openfeature-unit-maintenance 48.51% <ø> (ø)
openfeature-unit-oldest 48.51% <ø> (ø)
openfeature-windows 37.78% <ø> (ø)
platform-core 37.27% <ø> (ø)
platform-esbuild 40.61% <ø> (ø)
platform-instrumentations-misc 30.69% <ø> (ø)
platform-integration-active 46.91% <ø> (-0.02%) ⬇️
platform-integration-latest 46.88% <ø> (ø)
platform-integration-maintenance 46.93% <ø> (ø)
platform-integration-oldest 47.10% <ø> (ø)
platform-shimmer 42.29% <ø> (ø)
platform-unit-guardrails 36.12% <ø> (ø)
platform-webpack 20.44% <ø> (ø)
plugins-azure-durable-functions 36.91% <ø> (ø)
plugins-azure-event-hubs 34.75% <ø> (ø)
plugins-azure-service-bus 35.22% <ø> (ø)
plugins-bullmq 40.01% <ø> (-0.09%) ⬇️
plugins-cassandra 34.58% <ø> (-0.08%) ⬇️
plugins-cookie 26.65% <ø> (ø)
plugins-cookie-parser 26.46% <ø> (ø)
plugins-crypto 27.69% <ø> (ø)
plugins-dd-trace-api 34.67% <ø> (-0.09%) ⬇️
plugins-express-mongo-sanitize 26.59% <ø> (ø)
plugins-express-session 26.42% <ø> (ø)
plugins-fastify 38.63% <ø> (-0.08%) ⬇️
plugins-fetch 34.96% <ø> (-0.08%) ⬇️
plugins-fs 35.02% <ø> (-0.09%) ⬇️
plugins-generic-pool 25.58% <ø> (ø)
plugins-google-cloud-pubsub 42.39% <ø> (-0.08%) ⬇️
plugins-grpc 37.40% <ø> (-0.08%) ⬇️
plugins-handlebars 26.63% <ø> (ø)
plugins-hapi 36.52% <ø> (-0.09%) ⬇️
plugins-hono 36.81% <ø> (-0.08%) ⬇️
plugins-ioredis 35.10% <ø> (-0.09%) ⬇️
plugins-knex 26.31% <ø> (ø)
plugins-langgraph 34.38% <ø> (-0.09%) ⬇️
plugins-ldapjs 24.20% <ø> (ø)
plugins-light-my-request 26.06% <ø> (ø)
plugins-limitd-client 29.49% <ø> (-0.09%) ⬇️
plugins-lodash 25.65% <ø> (ø)
plugins-mariadb 36.00% <ø> (-0.15%) ⬇️
plugins-memcached 34.76% <ø> (-0.09%) ⬇️
plugins-microgateway-core 35.65% <ø> (-0.09%) ⬇️
plugins-modelcontextprotocol-sdk 33.66% <ø> (-0.09%) ⬇️
plugins-moleculer 37.48% <ø> (-0.09%) ⬇️
plugins-mongodb 35.95% <ø> (-0.19%) ⬇️
plugins-mongodb-core 35.67% <ø> (-0.09%) ⬇️
plugins-mongoose 35.46% <ø> (-0.08%) ⬇️
plugins-multer 26.42% <ø> (ø)
plugins-mysql 35.74% <ø> (-0.09%) ⬇️
plugins-mysql2 35.82% <ø> (-0.09%) ⬇️
plugins-node-serialize 26.69% <ø> (ø)
plugins-opensearch 34.46% <ø> (-0.09%) ⬇️
plugins-passport-http 26.47% <ø> (ø)
plugins-pino 31.19% <ø> (-0.09%) ⬇️
plugins-postgres 33.83% <ø> (-0.08%) ⬇️
plugins-process 27.69% <ø> (ø)
plugins-pug 26.65% <ø> (ø)
plugins-redis 35.10% <ø> (-0.09%) ⬇️
plugins-router 38.97% <ø> (-0.08%) ⬇️
plugins-sequelize 25.36% <ø> (ø)
plugins-test-and-upstream-amqp10 35.00% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-amqplib 40.23% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 35.87% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-avsc 34.34% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 30.57% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-connect 37.19% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-graphql 36.78% <ø> (-0.06%) ⬇️
plugins-test-and-upstream-koa 36.78% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-protobufjs 34.55% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 40.24% <ø> (-0.09%) ⬇️
plugins-undici 35.69% <ø> (-0.08%) ⬇️
plugins-url 27.69% <ø> (ø)
plugins-valkey 34.77% <ø> (-0.09%) ⬇️
plugins-vm 27.69% <ø> (ø)
plugins-winston 31.08% <ø> (-0.09%) ⬇️
plugins-ws 38.31% <ø> (-0.10%) ⬇️
profiling-macos 42.66% <ø> (-0.05%) ⬇️
profiling-ubuntu 43.11% <ø> (-0.01%) ⬇️
profiling-windows 39.96% <ø> (-0.07%) ⬇️
serverless-aws-sdk-latest-aws-sdk 34.66% <ø> (-0.07%) ⬇️
serverless-aws-sdk-latest-bedrockruntime 33.00% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-client 22.38% <ø> (ø)
serverless-aws-sdk-latest-dynamodb 35.62% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-eventbridge 28.76% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-kinesis 38.56% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-lambda 35.81% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-s3 33.77% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-serverless-peer-service 39.93% <ø> (-0.09%) ⬇️
serverless-aws-sdk-latest-sns 39.66% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-sqs 38.94% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-stepfunctions 34.38% <ø> (-0.08%) ⬇️
serverless-aws-sdk-latest-util 47.71% <ø> (ø)
serverless-aws-sdk-oldest-aws-sdk 34.76% <ø> (-0.07%) ⬇️
serverless-aws-sdk-oldest-bedrockruntime 33.28% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-client 22.75% <ø> (ø)
serverless-aws-sdk-oldest-dynamodb 35.69% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-eventbridge 28.81% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-kinesis 38.69% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-lambda 35.89% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-s3 33.83% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-serverless-peer-service 39.99% <ø> (-0.09%) ⬇️
serverless-aws-sdk-oldest-sns 39.74% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-sqs 38.83% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-stepfunctions 34.46% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-util 48.03% <ø> (ø)
serverless-azure-functions-eventhubs 38.40% <ø> (ø)
serverless-azure-functions-servicebus 38.46% <ø> (ø)
serverless-lambda 32.76% <ø> (-0.08%) ⬇️
test-optimization-cucumber-latest-7.0.0 50.42% <ø> (+0.09%) ⬆️
test-optimization-cucumber-latest-latest 53.05% <ø> (+0.12%) ⬆️
test-optimization-cucumber-oldest-7.0.0 50.35% <ø> (+0.12%) ⬆️
test-optimization-cypress-latest-12.0.0-commonJS 48.25% <ø> (+0.05%) ⬆️
test-optimization-cypress-latest-12.0.0-esm 48.28% <ø> (+0.05%) ⬆️
test-optimization-cypress-latest-14.5.4-commonJS 48.10% <ø> (+0.07%) ⬆️
test-optimization-cypress-latest-14.5.4-esm 48.13% <ø> (+0.07%) ⬆️
test-optimization-cypress-latest-latest-commonJS 48.60% <ø> (+0.07%) ⬆️
test-optimization-cypress-latest-latest-esm 48.63% <ø> (+0.07%) ⬆️
test-optimization-cypress-oldest-12.0.0-commonJS 48.29% <ø> (+0.07%) ⬆️
test-optimization-cypress-oldest-12.0.0-esm 48.32% <ø> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-commonJS 48.14% <ø> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-esm 48.17% <ø> (+0.07%) ⬆️
test-optimization-jest-latest-latest 54.82% <ø> (+0.10%) ⬆️
test-optimization-jest-latest-oldest 53.53% <ø> (-0.02%) ⬇️
test-optimization-jest-oldest-latest 54.82% <ø> (+0.08%) ⬆️
test-optimization-jest-oldest-oldest 53.56% <ø> (+0.08%) ⬆️
test-optimization-mocha-latest-latest 53.33% <ø> (+0.08%) ⬆️
test-optimization-mocha-latest-oldest 50.94% <ø> (+0.11%) ⬆️
test-optimization-mocha-oldest-latest 53.39% <ø> (+0.08%) ⬆️
test-optimization-mocha-oldest-oldest 50.88% <ø> (+0.08%) ⬆️
test-optimization-playwright-latest-latest-playwright-active-test-span 44.21% <ø> (+0.26%) ⬆️
test-optimization-playwright-latest-latest-playwright-atr 43.00% <ø> (+0.11%) ⬆️
test-optimization-playwright-latest-latest-playwright-efd 43.38% <ø> (+0.09%) ⬆️
test-optimization-playwright-latest-latest-playwright-final-status 43.47% <ø> (+0.13%) ⬆️
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.93% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-reporting 42.42% <ø> (+0.09%) ⬆️
test-optimization-playwright-latest-latest-playwright-test-management 44.61% <ø> (+0.10%) ⬆️
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.30% <ø> (+0.28%) ⬆️
test-optimization-playwright-latest-oldest-playwright-atr 43.21% <ø> (+0.11%) ⬆️
test-optimization-playwright-latest-oldest-playwright-efd 43.43% <ø> (+0.09%) ⬆️
test-optimization-playwright-latest-oldest-playwright-final-status 43.53% <ø> (+0.11%) ⬆️
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.98% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-reporting 42.49% <ø> (+0.09%) ⬆️
test-optimization-playwright-latest-oldest-playwright-test-management 44.68% <ø> (+0.10%) ⬆️
test-optimization-playwright-oldest-latest-playwright-active-test-span 44.25% <ø> (+0.26%) ⬆️
test-optimization-playwright-oldest-latest-playwright-atr 43.04% <ø> (+0.11%) ⬆️
test-optimization-playwright-oldest-latest-playwright-efd 43.39% <ø> (+0.06%) ⬆️
test-optimization-playwright-oldest-latest-playwright-final-status 43.48% <ø> (+0.11%) ⬆️
test-optimization-playwright-oldest-latest-playwright-impacted-tests 42.97% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-reporting 42.44% <ø> (+0.09%) ⬆️
test-optimization-playwright-oldest-latest-playwright-test-management 44.62% <ø> (+0.10%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.34% <ø> (+0.28%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-atr 43.25% <ø> (+0.11%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-efd 43.44% <ø> (+0.09%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-final-status 43.54% <ø> (+0.11%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 43.02% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-reporting 42.50% <ø> (+0.09%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-test-management 44.70% <ø> (+0.10%) ⬆️
test-optimization-selenium-latest 45.62% <ø> (+0.07%) ⬆️
test-optimization-selenium-oldest 45.12% <ø> (+0.07%) ⬆️
test-optimization-testopt-active 46.98% <ø> (+0.13%) ⬆️
test-optimization-testopt-latest 46.94% <ø> (+0.13%) ⬆️
test-optimization-testopt-maintenance 46.98% <ø> (+0.13%) ⬆️
test-optimization-testopt-oldest 47.85% <ø> (+0.14%) ⬆️
test-optimization-vitest-latest 50.95% <ø> (+0.11%) ⬆️
test-optimization-vitest-oldest 47.68% <ø> (+0.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 5.8 MB
Deduped: 6.65 MB
No deduping: 6.65 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented May 8, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 86.74% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bb58141 | Docs | Datadog PR Page | Give us feedback!

@rochdev
rochdev marked this pull request as ready for review May 8, 2026 16:34
@rochdev
rochdev requested a review from a team as a code owner May 8, 2026 16:34
@pr-commenter

pr-commenter Bot commented May 8, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-09 10:50:40

Comparing candidate commit bb58141 in PR branch rochdev/test-ws-hook-refactor with baseline commit a3bb4cd in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1732 metrics, 112 unstable metrics.


const dc = require('dc-polyfill')
const { after, afterEach, before, beforeEach, describe, it } = require('mocha')
const setSocketCh = dc.channel('tracing:ws:server:connect:setSocket')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking, but with DataDog/dc-polyfill#27 this isn't really needed anymore

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed redundant from a fix perspective, but it's still good practice to call channel only once at the top, so no harm in keeping it like that.

@BridgeAR
BridgeAR enabled auto-merge (squash) May 9, 2026 10:38
@BridgeAR
BridgeAR merged commit a39c44e into master May 9, 2026
1038 of 1039 checks passed
@BridgeAR
BridgeAR deleted the rochdev/test-ws-hook-refactor branch May 9, 2026 10:54
dd-octo-sts Bot pushed a commit that referenced this pull request May 10, 2026
…afterEach (#8367)

- Replace hardcoded ports (6015, 16015) with port 0 so the kernel
  assigns an available port, eliminating inter-run port conflicts
- Move regression-test resource cleanup (server, socket) from test
  bodies into dedicated afterEach hooks
- Split combined afterEach callbacks into one hook per concern so a
  failure in one cleanup step doesn't skip the others
- Load/close the agent in beforeEach/afterEach instead of before/after
  so each test gets a clean agent state
- Move channel declaration to top of file

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This was referenced May 10, 2026
rochdev added a commit that referenced this pull request May 13, 2026
…afterEach (#8367)

- Replace hardcoded ports (6015, 16015) with port 0 so the kernel
  assigns an available port, eliminating inter-run port conflicts
- Move regression-test resource cleanup (server, socket) from test
  bodies into dedicated afterEach hooks
- Split combined afterEach callbacks into one hook per concern so a
  failure in one cleanup step doesn't skip the others
- Load/close the agent in beforeEach/afterEach instead of before/after
  so each test gets a clean agent state
- Move channel declaration to top of file

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants