chl-wxp commented on code in PR #9946:
URL: https://github.com/apache/seatunnel/pull/9946#discussion_r2434325121


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-redis-e2e/src/test/java/org/apache/seatunnel/e2e/connector/redis/RedisTestCaseTemplateIT.java:
##########
@@ -611,13 +633,23 @@ public void 
testCustomHashKeyAndValueWriteRedis(TestContainer container)
     }
 
     @TestTemplate
-    public void testFakeToRedisDeleteHashTest(TestContainer container)
-            throws IOException, InterruptedException {
-        Container.ExecResult execResult =
-                container.executeJob("/fake-to-redis-test-delete-hash.conf");
-        Assertions.assertEquals(0, execResult.getExitCode());
-        Assertions.assertEquals(2, jedis.hlen("hash_check"));
-        jedis.del("hash_check");
+    public void testFakeToRedisDeleteHashTest(TestContainer container) throws 
IOException {
+        String key = "hash_check";
+        final RedisSinkWriter redisSinkWriter = 
getRedisSinkWriter(RedisDataType.HASH, key);
+        List<SeaTunnelRow> rowList =
+                Arrays.asList(
+                        getSeaTunnelRowInsert1(),
+                        getSeaTunnelRowInsert2(),
+                        getSeaTunnelRowInsert3(),
+                        getSeaTunnelRowUpdateBefore(),
+                        getSeaTunnelRowUpdateAfter(),
+                        getSeaTunnelRowDelete());
+        for (SeaTunnelRow seaTunnelRow : rowList) {
+            redisSinkWriter.write(seaTunnelRow);
+        }
+        redisSinkWriter.close();
+        Assertions.assertEquals(2, jedis.hlen(key));
+        jedis.del(key);

Review Comment:
   I think it is not necessary to submit configuration files to implement some 
functional points in redis. Unit testing can be used to satisfy this 
requirement. In addition, nearly 40 test tasks will slow down the e2e 
efficiency of this module.



-- 
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