eskabetxe commented on code in PR #22266:
URL: https://github.com/apache/flink/pull/22266#discussion_r1150557681
##########
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:
This test use a FailureMapper that fails in a Random way Random times, and
uses the min and max ElementsPerFailure for that..
I change this FailureMapper to fail the expectedFailures and have a
predictable behaviour.
The restartStrategy is change from a infinite (Integer.MAX_VALUE) to double
of expected failures, so the test can fail in some way..
What happen now with the Oracle test is that the test enters in a loop of
failures but never get to max restarts and hangs up.
--
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]