tillrohrmann commented on a change in pull request #9794:
[FLINK-14247][runtime] Use NoResourceAvailableException to wrap
TimeoutException on slot allocation timeout
URL: https://github.com/apache/flink/pull/9794#discussion_r330452472
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerTest.java
##########
@@ -238,6 +242,16 @@ public void failJobIfNotEnoughResources() throws
Exception {
waitForTermination(scheduler);
final JobStatus jobStatus = scheduler.requestJobStatus();
assertThat(jobStatus, is(Matchers.equalTo(JobStatus.FAILED)));
+
+ Throwable failureCause = scheduler.requestJob()
+ .getFailureInfo()
+ .getException()
+
.deserializeError(DefaultSchedulerTest.class.getClassLoader());
+ assertTrue(findThrowable(failureCause,
NoResourceAvailableException.class).isPresent());
+ assertTrue(
+ findThrowableWithMessage(
+ failureCause,
+ "Could not allocate the required slot within
slot request timeout.").isPresent());
Review comment:
It is true that we always report the number of required logical slots which
can be an order larger than the underlying physical slots due to slot sharing.
I guess that we re-add the proper reporting about the number of required slots
available slots once we schedule based on pipelined regions. Until then, I'm ok
with changing the message here.
----------------------------------------------------------------
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