Commit aa68f29
authored
test(ci-vis): fix flaky agent-proxy test race (#7532)
The setUrl test didn't await _canUseCiVisProtocolPromise,
leaving an in-flight fetchAgentInfo callback that could
fire after the next beforeEach's clearCache(), polluting
the module-level cache with stale /info data. This caused
_isGzipCompatible to intermittently read cached v2-only
endpoints instead of the test's own v4+ nock response.
Await the promise in the setUrl test and add
nock.abortPendingRequests() to beforeEach as an
additional safeguard against leaked in-flight responses.1 parent 774492e commit aa68f29
File tree
1 file changed
+4
-2
lines changed- packages/dd-trace/test/ci-visibility/exporters/agent-proxy
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
303 | | - | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
0 commit comments