You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/30 13:43:31 UTC

[GitHub] [flink] GJL commented on a change in pull request #9794: [FLINK-14247][runtime] Use NoResourceAvailableException to wrap TimeoutException on slot allocation timeout

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_r329497605
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerTest.java
 ##########
 @@ -238,6 +243,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());
+		Assert.assertTrue(
 
 Review comment:
   `org.junit.Assert.assertTrue` vs. `junit.framework.TestCase.assertTrue`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services