Commit e3ef803
Fix JMS1 CLIENT_ACKNOWLEDGE flaky test with high scope iteration keep-alive (#10798)
Mark receiving messages with manual acknowledgement as @flaky for JMS1V1ForkedTest
The TEMPORARY_TOPIC variant of this test has a race condition where the 3rd
consumer trace can complete before acknowledge() is called, yielding 6 traces
instead of the expected 5 at the first assertion point. This is inherent to
the async nature of JMS message processing with TEMPORARY_TOPICs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix JMS1 CLIENT_ACKNOWLEDGE flaky test by tolerating early scope cleanup
The "receiving messages from TEMPORARY_TOPIC with manual acknowledgement"
test in JMS1V1ForkedTest was flaky because the scope iteration keep-alive
cleanup (set to 1 second in tests) could finish the 3rd consumer span
before acknowledge() was called, producing 6 traces instead of expected 5.
Root cause: In the legacy context manager path, activateNext() schedules a
root iteration scope cleanup. If this fires before the test's intermediate
assertTraces(5) check, the 3rd consumer trace is already complete.
Fix: Use assertTraces(5, true) for the intermediate assertion to tolerate
additional traces. Also fix ListWriterAssert.ignoreAdditionalTraces to
properly use >= instead of == for the size check, matching the behavior
of the Java TraceAssertions class.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix JMS1 CLIENT_ACKNOWLEDGE flaky test with low scope iteration keep-alive
Set SCOPE_ITERATION_KEEP_ALIVE to 1ms in the manual acknowledgement test
so the 3rd consumer span is always cleaned up before assertion, making
the test deterministic with assertTraces(6) instead of tolerating 5 or 6.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Retry CI after infrastructure failures
Retry CI - ghcr.io connectivity issue
ci: retrigger pipeline (infrastructure failures)
fix: restore acknowledge() before assertTraces to fix timeout
The 3rd consumer span needs acknowledge() to complete before
assertTraces(6) can succeed. SCOPE_ITERATION_KEEP_ALIVE alone
is not sufficient — the acknowledge triggers the span to finish.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: restore two-phase assertion with high keep-alive to prevent flakiness
Set SCOPE_ITERATION_KEEP_ALIVE to 10s to prevent early cleanup of the
3rd consumer span. This makes the test deterministic:
- Phase 1: 5 traces (3rd consumer span still open, not yet acknowledged)
- Phase 2: 6 traces (after receivedMessage3.acknowledge())
The original flakiness was caused by the default keep-alive being short
enough that the 3rd consumer span sometimes got cleaned up before the
first assertion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ci: retrigger pipeline to resolve SSI infrastructure failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 1e2a36d commit e3ef803
File tree
1 file changed
+6
-2
lines changed- dd-java-agent/instrumentation/jms/javax-jms-1.1/src/test/groovy
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
276 | 280 | | |
277 | 281 | | |
278 | 282 | | |
279 | | - | |
| 283 | + | |
| 284 | + | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
| |||
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
303 | | - | |
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
| |||
0 commit comments