Skip to content

Commit

Permalink
Fix a flaky test
Browse files Browse the repository at this point in the history
It turns out that sometimes the slow log entry has a duration of zero,
so cover for this case too.
  • Loading branch information
gerzse committed Mar 8, 2024
1 parent 524dc79 commit 1819c8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void slowlogObjectDetails() {
Slowlog log = logs.get(0);
assertThat(log.getId(), Matchers.greaterThan(0L));
assertThat(log.getTimeStamp(), Matchers.greaterThan(0L));
assertThat(log.getExecutionTime(), Matchers.greaterThan(0L));
assertThat(log.getExecutionTime(), Matchers.greaterThanOrEqualTo(0L));
assertEquals(4, log.getArgs().size());
assertEquals(SafeEncoder.encode(Protocol.Command.CONFIG.getRaw()), log.getArgs().get(0));
assertEquals(SafeEncoder.encode(Protocol.Keyword.SET.getRaw()), log.getArgs().get(1));
Expand Down

0 comments on commit 1819c8f

Please sign in to comment.