Skip to content

Commit

Permalink
test: Added wait for live test
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Apr 22, 2024
1 parent e7e5e57 commit 76befec
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.redis.spring.batch.gen.GeneratorItemReader;
import com.redis.spring.batch.gen.Item.Type;
import com.redis.spring.batch.test.KeyspaceComparison;
import com.redis.spring.batch.util.Await;

import io.lettuce.core.cluster.SlotHash;

Expand Down Expand Up @@ -89,6 +90,7 @@ void liveKeyExclude(TestInfo info) throws Throwable {
generator2.setKeyspace("bad");
generateAsync(testInfo(info, "gen-2"), generator2);
execute(info, "replicate-live-key-exclude");
Await.await().until(() -> redisCommands.pubsubNumpat() == 0);
Assertions.assertEquals(badCount, keyCount("bad:*"));
Assertions.assertEquals(0, targetRedisCommands.keys("bad:*").size());
Assertions.assertEquals(goodCount, targetRedisCommands.keys("gen:*").size());
Expand Down

0 comments on commit 76befec

Please sign in to comment.