FuYouJ commented on code in PR #7888:
URL: https://github.com/apache/seatunnel/pull/7888#discussion_r1818119505


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-redis-e2e/src/test/java/org/apache/seatunnel/e2e/connector/redis/RedisTestCaseTemplateIT.java:
##########
@@ -357,5 +357,42 @@ public void testMultipletableRedisSink(TestContainer 
container)
         jedis.select(0);
     }
 
+    @TestTemplate
+    public void testCustomKeyWriteRedis(TestContainer container)
+            throws IOException, InterruptedException {
+        String s = jedis.get("aaa");
+        Container.ExecResult execResult = 
container.executeJob("/redis-to-redis-custom-key.conf");
+        Assertions.assertEquals(0, execResult.getExitCode());
+        int count = 0;
+        for (int i = 0; i < 100; i++) {
+            String data = jedis.get("custom-key-check:" + i);
+            if (data != null) {
+                count++;
+            }
+        }
+        Assertions.assertEquals(100, count);
+        for (int i = 0; i < 100; i++) {
+            jedis.del("custom-key-check:" + i);
+        }
+    }
+
+    @TestTemplate
+    public void testCustomValueWriteRedis(TestContainer container)
+            throws IOException, InterruptedException {
+        Container.ExecResult execResult = 
container.executeJob("/redis-to-redis-custom-value.conf");
+        Assertions.assertEquals(0, execResult.getExitCode());
+        Assertions.assertEquals("string", jedis.get("custom-value-check"));
+        jedis.del("custom-value-check");
+    }
+
+    @TestTemplate
+    public void testCustomHashDataWriteRedis(TestContainer container)
+            throws IOException, InterruptedException {
+        Container.ExecResult execResult = 
container.executeJob("/redis-to-redis-custom-hash.conf");

Review Comment:
   It should be verified using new test data to ensure that the amount of data 
written is correct in the context of hashData?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to