test(test-optimization): assert complete run payloads#9358
Conversation
Assertions that resolved on a valid prefix could miss duplicate or late payloads emitted before the child finished. Apply the existing post-exit drain collector to repeated-run, finalization, and retry contracts, and make its timing tests deterministic.
Overall package sizeSelf size: 6.76 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔄 Datadog retried 1 test - 1 passed on retry 🔄 Datadog auto-retried 1 job - 1 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 571a74b | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-15 09:36:16 Comparing candidate commit 571a74b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2328 metrics, 30 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9358 +/- ##
=======================================
Coverage 96.64% 96.64%
=======================================
Files 923 923
Lines 122844 122844
Branches 20989 21051 +62
=======================================
+ Hits 118723 118727 +4
+ Misses 4121 4117 -4 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Ruben Bridgewater <[email protected]>
There was a problem hiding this comment.
More details
PR migrates payload assertions from early-resolution (gatherPayloadsMaxTimeout) to late-resolution (gatherPayloadsUntilChildExit) to catch duplicate/late events emitted before child process exit. All 9 unit tests pass, including the critical duplicate-detection test that validates the fix; real integration test files have correct syntax and API usage. No behavioral regressions found.
📊 Validated against 9 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 571a74b · What is Autotest? · Any feedback? Reach out in #autotest
Assertions that resolved on a valid prefix could miss duplicate or late payloads emitted before the child finished. Apply the existing post-exit drain collector to repeated-run, finalization, and retry contracts, and make its timing tests deterministic.
Assertions that resolved on a valid prefix could miss duplicate or late payloads emitted before the child finished. Apply the existing post-exit drain collector to repeated-run, finalization, and retry contracts, and make its timing tests deterministic.
Assertions that resolved on a valid prefix could miss duplicate or late payloads emitted before the child finished. Apply the existing post-exit drain collector to repeated-run, finalization, and retry contracts, and make its timing tests deterministic.
Assertions that resolved on a valid prefix could miss duplicate or late payloads emitted before the child finished. Apply the existing post-exit drain collector to repeated-run, finalization, and retry contracts, and make its timing tests deterministic.
Summary
Payload assertions that resolve as soon as a valid prefix arrives can miss duplicate or late events emitted before the test process finishes. This moves repeated-run, finalization, and retry contracts to the existing child-exit-plus-drain collector and pins that collector's timing behavior with fake timers.