From a110e70eb549e4aacc868c10a594a3cd6eaeb327 Mon Sep 17 00:00:00 2001 From: Julien Ruaux Date: Mon, 17 Jul 2023 21:46:15 -0700 Subject: [PATCH] test: Added replicate-ds test --- .../redis/riot/cli/AbstractIntegrationTests.java | 14 ++++++++++++-- plugins/riot/src/test/resources/replicate-ds | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 plugins/riot/src/test/resources/replicate-ds diff --git a/plugins/riot/src/test/java/com/redis/riot/cli/AbstractIntegrationTests.java b/plugins/riot/src/test/java/com/redis/riot/cli/AbstractIntegrationTests.java index 7e1adfdeb..f409b3aac 100644 --- a/plugins/riot/src/test/java/com/redis/riot/cli/AbstractIntegrationTests.java +++ b/plugins/riot/src/test/java/com/redis/riot/cli/AbstractIntegrationTests.java @@ -692,7 +692,7 @@ void generateTypes() throws Exception { } @Test - void replicateKeyDumps() throws Throwable { + void replicate() throws Throwable { String filename = "replicate"; generate(filename); Assertions.assertTrue(connection.sync().dbsize() > 0); @@ -809,10 +809,20 @@ void replicateLiveKeySlot() throws Exception { } @Test - void replicateLiveDataStructures() throws Exception { + void replicateDsLive() throws Exception { runLiveReplication("replicate-ds-live"); } + @Test + void replicateDs() throws Throwable { + String filename = "replicate-ds"; + GeneratorItemReader generator = generator(); + generator.setMaxItemCount(100000); + generate(filename, DEFAULT_BATCH_SIZE, generator); + Assertions.assertTrue(connection.sync().dbsize() > 0); + execute(filename); + } + protected void runLiveReplication(String filename) throws Exception { connection.sync().configSet("notify-keyspace-events", "AK"); generate(filename, DEFAULT_BATCH_SIZE, generator(3000)); diff --git a/plugins/riot/src/test/resources/replicate-ds b/plugins/riot/src/test/resources/replicate-ds new file mode 100644 index 000000000..4e053b61a --- /dev/null +++ b/plugins/riot/src/test/resources/replicate-ds @@ -0,0 +1 @@ +riot -h source -p 6379 replicate --type ds -h target -p 6380 \ No newline at end of file