Skip to content

Commit

Permalink
test: Moved compareStreams to stack tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Apr 30, 2024
1 parent 208ae9d commit 24975d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,6 @@ void compareQuick(TestInfo info) throws Exception {
Assertions.assertEquals(sourceCount - targetCount, comparison.get(Status.MISSING).size());
}

@Test
void compareStreams(TestInfo info) throws Exception {
GeneratorItemReader gen = generator(10);
gen.setTypes(DataType.STREAM);
generate(info, gen);
RedisItemReader<String, String, MemKeyValue<String, Object>> reader = structReader(info);
RedisItemWriter<String, String, KeyValue<String, Object>> writer = RedisItemWriter.struct();
writer.setClient(targetRedisClient);
replicate(info, reader, writer);
KeyspaceComparison<String> comparison = compare(info);
Assertions.assertEquals(Collections.emptyList(), comparison.mismatches());
}

@Test
void compareStatus(TestInfo info) throws Exception {
GeneratorItemReader gen = generator(120);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -572,4 +573,17 @@ void writeStructMerge(TestInfo info) throws Exception {
assertEquals(10, actual.size());
}

@Test
void compareStreams(TestInfo info) throws Exception {
GeneratorItemReader gen = generator(10);
gen.setTypes(DataType.STREAM);
generate(info, gen);
RedisItemReader<String, String, MemKeyValue<String, Object>> reader = structReader(info);
RedisItemWriter<String, String, KeyValue<String, Object>> writer = RedisItemWriter.struct();
writer.setClient(targetRedisClient);
replicate(info, reader, writer);
KeyspaceComparison<String> comparison = compare(info);
Assertions.assertEquals(Collections.emptyList(), comparison.mismatches());
}

}

0 comments on commit 24975d3

Please sign in to comment.