Skip to content

Commit a25d04d

Browse files
thachlpggivo
andauthored
Fix flaky test ClientCommandsTest.killSkipmeYesNo (#4206)
* Fix flaky test ClientCommandsTest.killSkipmeYesNo * Format the file * revert formatting only changes * improve test failure reporting * fix test condition --------- Co-authored-by: ggivo <[email protected]>
1 parent 8e60c1b commit a25d04d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/java/redis/clients/jedis/commands/jedis/ClientCommandsTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package redis.clients.jedis.commands.jedis;
22

3+
import static org.hamcrest.MatcherAssert.assertThat;
4+
import static org.hamcrest.Matchers.greaterThan;
5+
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
36
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
47
import static org.junit.jupiter.api.Assertions.assertEquals;
58
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -178,7 +181,9 @@ public void killSkipmeNo() {
178181
public void killSkipmeYesNo() {
179182
jedis.clientKill(new ClientKillParams().type(ClientType.NORMAL).skipMe(SkipMe.YES));
180183
assertDisconnected(client);
181-
assertEquals(1, jedis.clientKill(new ClientKillParams().type(ClientType.NORMAL).skipMe(SkipMe.NO)));
184+
185+
ClientKillParams skipmeNo = new ClientKillParams().type(ClientType.NORMAL).skipMe(SkipMe.NO);
186+
assertThat(jedis.clientKill(skipmeNo), greaterThanOrEqualTo(1L));
182187
assertDisconnected(jedis);
183188
}
184189

0 commit comments

Comments
 (0)