Skip to content

test(integration): use stopProc in package tests#7839

Merged
BridgeAR merged 1 commit intomasterfrom
watson/improve-integration-test-proc-stop
Mar 23, 2026
Merged

test(integration): use stopProc in package tests#7839
BridgeAR merged 1 commit intomasterfrom
watson/improve-integration-test-proc-stop

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Mar 23, 2026

What does this PR do?

Follow up on #7661 by applying the same process teardown cleanup to package-hosted integration tests under packages/.

This replaces direct proc.kill() calls in test teardown with the shared stopProc helper so the child process is fully stopped before the next test runs. For the Azure-hosted tests, stopProc now accepts an optional initial signal so they can keep using SIGINT before falling back to SIGKILL if needed.

Motivation

#7661 made this change for tests in the root integration-tests/ directory, but there were still package-level integration tests using direct process termination.

This brings those remaining tests onto the same teardown path to reduce flakiness from leaked child processes and make integration test cleanup behavior consistent across the repo.

Replace direct proc.kill() teardown in package-hosted
integration specs with await stopProc(proc).

This makes process shutdown consistent with the root
integration tests and reduces flakiness from leaked child
process state. Add an optional signal to preserve the
existing SIGINT-based Azure teardown behavior.
Copy link
Copy Markdown
Collaborator Author

watson commented Mar 23, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@watson watson self-assigned this Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Overall package size

Self size: 5.04 MB
Deduped: 5.88 MB
No deduping: 5.88 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7839   +/-   ##
=======================================
  Coverage   80.48%   80.48%           
=======================================
  Files         749      749           
  Lines       32457    32457           
=======================================
  Hits        26124    26124           
  Misses       6333     6333           
Flag Coverage Δ
aiguard-macos 39.15% <ø> (-0.10%) ⬇️
aiguard-ubuntu 39.27% <ø> (-0.10%) ⬇️
aiguard-windows 38.97% <ø> (-0.10%) ⬇️
apm-capabilities-tracing-macos 49.00% <ø> (-0.01%) ⬇️
apm-capabilities-tracing-ubuntu 49.05% <ø> (ø)
apm-capabilities-tracing-windows 48.78% <ø> (-0.01%) ⬇️
apm-integrations-child-process 38.49% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.33% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-eol 37.82% <ø> (-0.10%) ⬇️
apm-integrations-oracledb 37.66% <ø> (-0.10%) ⬇️
appsec-express 55.17% <ø> (-0.09%) ⬇️
appsec-fastify 51.52% <ø> (-0.07%) ⬇️
appsec-graphql 51.68% <ø> (-0.08%) ⬇️
appsec-kafka 44.30% <ø> (-0.08%) ⬇️
appsec-ldapjs 43.92% <ø> (-0.08%) ⬇️
appsec-lodash 43.55% <ø> (-0.08%) ⬇️
appsec-macos 58.18% <ø> (-0.07%) ⬇️
appsec-mongodb-core 48.69% <ø> (-0.08%) ⬇️
appsec-mongoose 49.35% <ø> (-0.08%) ⬇️
appsec-mysql 50.88% <ø> (+0.03%) ⬆️
appsec-node-serialize 43.10% <ø> (-0.08%) ⬇️
appsec-passport 47.54% <ø> (-0.09%) ⬇️
appsec-postgres 50.51% <ø> (-0.09%) ⬇️
appsec-sourcing 42.53% <ø> (-0.08%) ⬇️
appsec-template 43.27% <ø> (-0.08%) ⬇️
appsec-ubuntu 58.26% <ø> (-0.07%) ⬇️
appsec-windows 58.03% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-bluebird 32.27% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 40.44% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-child_process 37.84% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.24% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 34.55% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.37% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 40.07% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 31.89% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 29.46% <ø> (ø)
instrumentations-instrumentation-http 39.71% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-knex 32.28% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 33.40% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-multer 40.19% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 38.21% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-passport 43.96% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-http 43.64% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-local 44.17% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-pg 37.65% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.20% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 32.21% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 32.25% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 32.18% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 32.22% <ø> (-0.10%) ⬇️
llmobs-ai 42.17% <ø> (-0.09%) ⬇️
llmobs-anthropic 40.21% <ø> (-0.09%) ⬇️
llmobs-bedrock 39.15% <ø> (-0.08%) ⬇️
llmobs-google-genai 39.69% <ø> (-0.09%) ⬇️
llmobs-langchain 39.95% <ø> (-0.18%) ⬇️
llmobs-openai 43.88% <ø> (-0.09%) ⬇️
llmobs-vertex-ai 39.94% <ø> (-0.09%) ⬇️
platform-core 31.47% <ø> (ø)
platform-esbuild 34.42% <ø> (ø)
platform-instrumentations-misc 48.41% <ø> (ø)
platform-shimmer 37.56% <ø> (ø)
platform-unit-guardrails 32.89% <ø> (ø)
plugins-azure-durable-functions 25.74% <ø> (ø)
plugins-azure-event-hubs 25.90% <ø> (ø)
plugins-azure-service-bus 25.26% <ø> (ø)
plugins-bullmq 44.18% <ø> (-0.10%) ⬇️
plugins-cassandra 37.69% <ø> (-0.23%) ⬇️
plugins-cookie 26.96% <ø> (ø)
plugins-cookie-parser 26.75% <ø> (ø)
plugins-crypto 26.73% <ø> (ø)
plugins-dd-trace-api 38.22% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.89% <ø> (ø)
plugins-express-session 26.70% <ø> (ø)
plugins-fastify 42.15% <ø> (-0.09%) ⬇️
plugins-fetch 38.28% <ø> (-0.09%) ⬇️
plugins-fs 38.56% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.94% <ø> (ø)
plugins-google-cloud-pubsub 45.34% <ø> (-0.09%) ⬇️
plugins-grpc 40.82% <ø> (-0.09%) ⬇️
plugins-handlebars 26.94% <ø> (ø)
plugins-hapi 40.07% <ø> (-0.10%) ⬇️
plugins-hono 40.33% <ø> (-0.10%) ⬇️
plugins-ioredis 38.37% <ø> (-0.10%) ⬇️
plugins-knex 26.57% <ø> (ø)
plugins-langgraph 38.38% <ø> (-0.10%) ⬇️
plugins-ldapjs 24.43% <ø> (ø)
plugins-light-my-request 26.30% <ø> (ø)
plugins-limitd-client 32.55% <ø> (-0.10%) ⬇️
plugins-lodash 26.03% <ø> (ø)
plugins-mariadb 39.41% <ø> (-0.10%) ⬇️
plugins-memcached 38.07% <ø> (-0.10%) ⬇️
plugins-microgateway-core 39.14% <ø> (-0.10%) ⬇️
plugins-moleculer 40.43% <ø> (-0.09%) ⬇️
plugins-mongodb 39.08% <ø> (-0.09%) ⬇️
plugins-mongodb-core 38.94% <ø> (-0.07%) ⬇️
plugins-mongoose 38.80% <ø> (-0.09%) ⬇️
plugins-multer 26.70% <ø> (ø)
plugins-mysql 39.11% <ø> (-0.10%) ⬇️
plugins-mysql2 39.20% <ø> (-0.10%) ⬇️
plugins-node-serialize 27.00% <ø> (ø)
plugins-opensearch 37.52% <ø> (-0.10%) ⬇️
plugins-passport-http 26.76% <ø> (ø)
plugins-postgres 35.50% <ø> (-0.09%) ⬇️
plugins-process 26.73% <ø> (ø)
plugins-pug 26.96% <ø> (ø)
plugins-redis 38.83% <ø> (-0.10%) ⬇️
plugins-router 43.01% <ø> (+0.04%) ⬆️
plugins-sequelize 25.55% <ø> (ø)
plugins-test-and-upstream-amqp10 38.42% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-amqplib 43.79% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-apollo 39.06% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-avsc 38.52% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-bunyan 33.80% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 40.73% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-graphql 40.01% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-koa 40.32% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-protobufjs 38.74% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-rhea 43.94% <ø> (-0.10%) ⬇️
plugins-undici 39.05% <ø> (-0.09%) ⬇️
plugins-url 26.73% <ø> (ø)
plugins-valkey 38.04% <ø> (-0.10%) ⬇️
plugins-vm 26.73% <ø> (ø)
plugins-winston 33.99% <ø> (-0.10%) ⬇️
plugins-ws 41.81% <ø> (-0.10%) ⬇️
profiling-macos 40.46% <ø> (-0.10%) ⬇️
profiling-ubuntu 40.58% <ø> (-0.53%) ⬇️
profiling-windows 42.13% <ø> (-0.10%) ⬇️
serverless-azure-functions-client 25.62% <ø> (ø)
serverless-azure-functions-eventhubs 25.62% <ø> (ø)
serverless-azure-functions-servicebus 25.62% <ø> (ø)

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.

@datadog-datadog-prod-us1-2

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 23, 2026

Benchmarks

Benchmark execution time: 2026-03-23 09:41:40

Comparing candidate commit 5fa3ab2 in PR branch watson/improve-integration-test-proc-stop with baseline commit a6f3a6f in branch master.

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

@watson watson marked this pull request as ready for review March 23, 2026 10:07
@watson watson requested review from a team as code owners March 23, 2026 10:07
@BridgeAR BridgeAR merged commit d0e644f into master Mar 23, 2026
836 of 840 checks passed
@BridgeAR BridgeAR deleted the watson/improve-integration-test-proc-stop branch March 23, 2026 13:29
dd-octo-sts bot pushed a commit that referenced this pull request Mar 24, 2026
Replace direct proc.kill() teardown in package-hosted
integration specs with await stopProc(proc).

This makes process shutdown consistent with the root
integration tests and reduces flakiness from leaked child
process state. Add an optional signal to preserve the
existing SIGINT-based Azure teardown behavior.
@dd-octo-sts dd-octo-sts bot mentioned this pull request Mar 24, 2026
tlhunter pushed a commit that referenced this pull request Mar 26, 2026
Replace direct proc.kill() teardown in package-hosted
integration specs with await stopProc(proc).

This makes process shutdown consistent with the root
integration tests and reduces flakiness from leaked child
process state. Add an optional signal to preserve the
existing SIGINT-based Azure teardown behavior.
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.

2 participants