tillrohrmann commented on a change in pull request #10608:
[FLINK-15300][Runtime] Fix sanity check to not fail if shuffle memory fraction
is out of min/max range
URL: https://github.com/apache/flink/pull/10608#discussion_r362812966
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/TaskExecutorResourceUtilsTest.java
##########
@@ -198,6 +198,52 @@ public void testConfigShuffleMemoryRange() {
});
}
+ @Test
+ public void
testConsistencyCheckOfDerivedShuffleMemoryWithinMinMaxRangeNotMatchingFractionPasses()
{
+ testConsistencyCheckOfDerivedShuffleMemoryAndItsFraction(
+ 100,
+ 1000);
+ }
+
+ @Test(expected = IllegalConfigurationException.class)
+ public void
testConsistencyCheckOfDerivedShuffleMemoryLessThanMinFails() {
+ testConsistencyCheckOfDerivedShuffleMemoryAndItsFraction(
+ 900,
+ 1000);
+ }
Review comment:
Looking at this test, it is not clear to me why it should fail with an
`IllegalConfigurationException`. I assume it relies on the fact that the static
final values at the top of the class add up so that the remaining shuffle
memory is too little. I think this makes the test harder to understand. It
would be easier if one could see just by looking at this test how large the
shuffle memory is. This also applies to
`testConsistencyCheckOfDerivedShuffleMemoryWithinMinMaxRangeNotMatchingFractionPasses`
and `testConsistencyCheckOfDerivedShuffleMemoryGreaterThanMaxFails`.
----------------------------------------------------------------
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