Commit 16bc1ed
Fix intermittent rocketmq-5-grpc-scenario test failure
simpleConsumeAsync() was fire-and-forget: it kicked off a
CompletableFuture chain (receiveAsync -> ackAsync) but returned
immediately without waiting for completion. The test thread would
exit and the HTTP response would be sent before consumer segments
were created, causing the mock collector to sometimes have fewer
than the expected 4 segments.
Changed from whenCompleteAsync (fire-and-forget) to thenComposeAsync
with .join(), so the method blocks until all async ack callbacks
have completed before returning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b4b20a3 commit 16bc1ed
File tree
1 file changed
+6
-9
lines changed- test/plugin/scenarios/rocketmq-5-grpc-scenario/src/main/java/test/apache/skywalking/apm/testcase/rocketmq/client/java/controller
1 file changed
+6
-9
lines changedLines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
211 | 207 | | |
212 | 208 | | |
213 | 209 | | |
214 | | - | |
| 210 | + | |
215 | 211 | | |
216 | 212 | | |
217 | | - | |
| 213 | + | |
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
221 | 217 | | |
222 | 218 | | |
223 | 219 | | |
224 | | - | |
225 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
226 | 223 | | |
227 | 224 | | |
228 | 225 | | |
| |||
0 commit comments