diff --git a/src/test/java/com/redis/trino/TestRediSearchConnectorSmokeTest.java b/src/test/java/com/redis/trino/TestRediSearchConnectorSmokeTest.java index 492f0bd..8ba93d4 100644 --- a/src/test/java/com/redis/trino/TestRediSearchConnectorSmokeTest.java +++ b/src/test/java/com/redis/trino/TestRediSearchConnectorSmokeTest.java @@ -55,7 +55,8 @@ private void deleteBeers() throws InterruptedException { } catch (Exception e) { // ignore } - while (redisearch.getTestContext().sync().dbsize() > 0) { + long start = System.currentTimeMillis(); + while (redisearch.getTestContext().sync().dbsize() > 0 && System.currentTimeMillis() < start + 3000) { Thread.sleep(10); } }