Skip to content

Commit

Permalink
#1715: fix flakey test in xpending (#1717)
Browse files Browse the repository at this point in the history
#1715: fix flacky test in xpending

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
  • Loading branch information
acarbonetto authored Jun 30, 2024
1 parent 583b2cd commit 5ce7a32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions java/integTest/src/test/java/glide/SharedCommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -4375,6 +4375,8 @@ public void xpending(BaseClient client) {
};
assertDeepEquals(expectedResult, pending_results);

// ensure idle_time > 0
Thread.sleep(2000);
Object[][] pending_results_extended =
client.xpending(key, groupName, InfRangeBound.MIN, InfRangeBound.MAX, 10L).get();

Expand Down
2 changes: 2 additions & 0 deletions python/python/tests/test_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5654,6 +5654,8 @@ async def test_xpending(self, redis_client: TGlideClient):
result.remove(consumer_results)
assert result == [5, stream_id1_0, stream_id1_4]

# to ensure an idle_time > 0
time.sleep(2)
range_result = await redis_client.xpending_range(
key, group_name, MinId(), MaxId(), 10
)
Expand Down

0 comments on commit 5ce7a32

Please sign in to comment.