Skip to content

Commit

Permalink
test: Moved replication test to Stack
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed May 25, 2024
1 parent 086bdea commit 62e6acc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.redis.testcontainers.RedisStackContainer;

@EnabledIfEnvironmentVariable(named = RedisEnterpriseServer.ENV_HOST, matches = ".*")
class REServerStack extends ReplicationTests {
class REServerStack extends RiotTests {

private static final RedisEnterpriseServer source = RedisContainerFactory.enterpriseServer();
private static final RedisStackContainer target = RedisContainerFactory.stack();
Expand Down
2 changes: 1 addition & 1 deletion plugins/riot/src/test/java/com/redis/riot/REStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.redis.testcontainers.RedisStackContainer;

@EnabledOnOs(OS.LINUX)
class REStack extends ReplicationTests {
class REStack extends RiotTests {

private static final RedisEnterpriseContainer source = RedisContainerFactory.enterprise();
private static final RedisStackContainer target = RedisContainerFactory.stack();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import io.lettuce.core.cluster.SlotHash;
import io.lettuce.core.codec.ByteArrayCodec;

abstract class ReplicationTests extends AbstractRiotTestBase {
abstract class RiotTests extends AbstractRiotTestBase {

@BeforeAll
void setDefaults() {
Expand Down Expand Up @@ -168,17 +168,6 @@ private RedisArgs redisArgs(RedisServer redis) {
return args;
}

@Test
void replication(TestInfo info) throws Throwable {
generate(info, generator(73));
Assertions.assertTrue(redisCommands.dbsize() > 0);
Replicate replication = new Replicate();
execute(replication, info);
KeyspaceComparison<String> comparison = compare(info);
Assertions.assertFalse(comparison.getAll().isEmpty());
Assertions.assertEquals(Collections.emptyList(), comparison.mismatches());
}

@Test
void keyProcessor(TestInfo info) throws Throwable {
String key1 = "key1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.redis.testcontainers.RedisStackContainer;

@EnabledOnOs(OS.LINUX)
class StackREContainer extends ReplicationTests {
class StackREContainer extends RiotTests {

private static final RedisStackContainer source = RedisContainerFactory.stack();
private static final RedisEnterpriseContainer target = RedisContainerFactory.enterprise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.redis.testcontainers.RedisStackContainer;

@EnabledIfEnvironmentVariable(named = RedisEnterpriseServer.ENV_HOST, matches = ".*")
public class StackREServer extends ReplicationTests {
public class StackREServer extends RiotTests {

private static final RedisStackContainer source = RedisContainerFactory.stack();
private static final RedisEnterpriseServer target = RedisContainerFactory.enterpriseServer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import picocli.CommandLine.ExitCode;
import picocli.CommandLine.ParseResult;

class StackReplicationTests extends ReplicationTests {
class StackTests extends RiotTests {

private static final RedisStackContainer source = RedisContainerFactory.stack();
private static final RedisStackContainer target = RedisContainerFactory.stack();
Expand Down Expand Up @@ -542,4 +542,15 @@ void replicateLiveOnlyStruct(TestInfo info) throws Exception {
Assertions.assertFalse(comparison.getAll().isEmpty());
Assertions.assertEquals(Collections.emptyList(), comparison.mismatches());
}

@Test
void replication(TestInfo info) throws Throwable {
generate(info, generator(73));
Assertions.assertTrue(redisCommands.dbsize() > 0);
Replicate replication = new Replicate();
execute(replication, info);
KeyspaceComparison<String> comparison = compare(info);
Assertions.assertFalse(comparison.getAll().isEmpty());
Assertions.assertEquals(Collections.emptyList(), comparison.mismatches());
}
}

0 comments on commit 62e6acc

Please sign in to comment.