azagrebin commented on a change in pull request #9374:
[FLINK-13581][coordination][tests] Harden BatchFineGrainedRecoveryITCase
URL: https://github.com/apache/flink/pull/9374#discussion_r311609274
##########
File path:
flink-tests/src/test/java/org/apache/flink/test/recovery/BatchFineGrainedRecoveryITCase.java
##########
@@ -110,13 +136,20 @@
private static final int MAX_JOB_RESTART_ATTEMPTS =
ALL_MAPPERS_BACKTRACK_FAILURES + 2 * MAP_NUMBER;
/**
- * Expected restart number for each mapper.
- *
- * <p>Initial start plus exception failure plus restarts from this and
each subsequent mapper's TM failure.
+ * Expected attempt number for each mapper.
*/
- private static final int[] EXPECTED_MAP_RESTARTS = IntStream
+ private static final int[] EXPECTED_MAP_ATTEMPT_NUMBERS = IntStream
.range(0, MAP_NUMBER)
- .map(i -> 1 + 1 + MAP_NUMBER - i)
+ .map(i ->
+ // exception failure:
+ 1 + // this mapper
+ i + // previous mappers
+ // TM failure:
+ (MAP_NUMBER - i - 1) + // subsequent mappers
after PartitionNotFoundException
+ 1 + // this mapper
+ 1 + // this mapper after
PartitionNotFoundException
+ i + // previous mappers
+ i) // previous mappers after
PartitionNotFoundException
Review comment:
Ok, we can try to simplify the test or you think this particular calculation
could be rewritten?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services