Skip to content

Commit

Permalink
test: Added sleep timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Ruaux committed Jan 2, 2023
1 parent 7132d5b commit 4ce6347
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 4ce6347

Please sign in to comment.