Skip to content

Commit 76e7ffa

Browse files
CopilotGilboaAWS
andauthored
Fix XPENDING/XCLAIM race condition in standalone RESP2 mode (#4577)
* Fix XPENDING/XCLAIM race condition in standalone RESP2 mode Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: GilboaAWS <97948000+GilboaAWS@users.noreply.github.com>
1 parent 77729b1 commit 76e7ffa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/integTest/src/test/java/glide/SharedCommandTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7985,6 +7985,11 @@ public void xpending_xclaim(BaseClient client) {
79857985
assertEquals(streamid_1, pending_results_extended[0][0]);
79867986
assertEquals(consumer1, pending_results_extended[0][1]);
79877987

7988+
// Small delay to ensure all XCLAIM and XACK operations are fully processed
7989+
// This addresses a race condition in standalone RESP2 mode where the final
7990+
// XPENDING call might not see all expected pending messages immediately
7991+
Thread.sleep(5);
7992+
79887993
pending_results_extended =
79897994
client
79907995
.xpending(

0 commit comments

Comments
 (0)