You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "snuyanzin (via GitHub)" <gi...@apache.org> on 2023/03/28 12:31:16 UTC

[GitHub] [flink] snuyanzin commented on a diff in pull request #22266: [FLINK-31525][tests] Stabilize JdbcExactlyOnceSinkE2eTest

snuyanzin commented on code in PR #22266:
URL: https://github.com/apache/flink/pull/22266#discussion_r1150532918


##########
flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/xa/JdbcExactlyOnceSinkE2eTest.java:
##########
@@ -195,22 +181,20 @@ public void testInsert() throws Exception {
         long started = System.currentTimeMillis();
         LOG.info("Test insert for {}", dbEnv);
         int elementsPerSource = 50;
-        int numElementsPerCheckpoint = 7;
-        int minElementsPerFailure = numElementsPerCheckpoint / 3;
-        int maxElementsPerFailure = numElementsPerCheckpoint * 3;
+        int numElementsPerCheckpoint = 10;
+        int expectedFailures = elementsPerSource / numElementsPerCheckpoint;
 
         StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
         env.setParallelism(dbEnv.getParallelism());
-        env.setRestartStrategy(fixedDelayRestart(Integer.MAX_VALUE, Time.milliseconds(100)));
-        env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);
+        env.setRestartStrategy(fixedDelayRestart(expectedFailures * 2, Time.milliseconds(100)));
+        env.getConfig().setAutoWatermarkInterval(0L);

Review Comment:
   Can you please elaborate a bit more about the changed math?
   I'm not telling that it is wrong, just want to understand the reasoning



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org