Commit 106ceb0
Fix flaky KafkaClientDataStreamsDisabledForkedTest batch consume test
The test mapped consumer traces to producer spans by positional index
after SORT_TRACES_BY_ID sorting. Since trace IDs are random, the
consumer-to-producer mapping was non-deterministic, causing intermittent
`span.parentId == parent.spanId` assertion failures.
Fix by dynamically finding each consumer span's actual parent producer
span via parentId matching instead of relying on sort order.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cc12228 commit 106ceb0
File tree
1 file changed
+11
-8
lines changed- dd-java-agent/instrumentation/kafka/kafka-clients-0.11/src/test/groovy
1 file changed
+11
-8
lines changedLines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
934 | 937 | | |
935 | 938 | | |
936 | 939 | | |
| |||
0 commit comments