test(playwright): stabilize request error tag reporting#9254
Conversation
Overall package sizeSelf size: 6.65 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 437.94 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 |
BenchmarksBenchmark execution time: 2026-07-08 09:19:47 Comparing candidate commit 3750249 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2309 metrics, 49 unstable metrics.
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 3750249 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9254 +/- ##
==========================================
- Coverage 96.54% 96.54% -0.01%
==========================================
Files 915 915
Lines 121018 121018
Branches 20693 20841 +148
==========================================
- Hits 116837 116835 -2
- Misses 4181 4183 +2 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:
|
There was a problem hiding this comment.
More details
The refactored tests are behaviorally sound. The switch from gatherPayloadsMaxTimeout to gatherPayloadsUntilChildExit with the minimal request-error-tag-test.js fixture eliminates the 15s race-to-deadline that caused intermittent failures, and the shared assertRequestErrorTag helper improves on the old code by adding assert.ok guards before property access (the old known-tests and test-management tests accessed .content directly without existence checks, which would have produced opaque TypeErrors). The added exitCode === 0 assertion also catches a previously silent failure mode.
📊 Validated against 17 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 3750249 · What is Autotest? · Any feedback? Reach out in #autotest
What does this PR do?
Stabilizes the Playwright request-error-tag reporting tests by running those assertions against a minimal Playwright fixture and waiting for the Playwright child process to exit before asserting on flushed CI Visibility payloads.
Motivation
The known-tests request-error-tag case was often failing at the 15s
gatherPayloadsMaxTimeoutdeadline with missing session/module events, then passing on retry. The test did not need the full default browser-heavy fixture suite, and asserting on a fixed deadline could inspect an incomplete payload buffer. This makes the test faster and deterministic instead of raising the timeout.