GJL 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_r330433784
 
 

 ##########
 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:
   The error message does not mention the number of slots anymore. IIRC in the 
legacy code path, the error message does not consider slot sharing so the 
information provided to the user was not accurate. I think it's fine to change 
this behavior. WDYT, @tillrohrmann?

----------------------------------------------------------------
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

Reply via email to