XComp commented on code in PR #23203:
URL: https://github.com/apache/flink/pull/23203#discussion_r1294810107
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/WaitingForResourcesTest.java:
##########
@@ -236,22 +234,23 @@ public void testStateTransitionOnResourceTimeout() throws
Exception {
}
@Test
- public void testTransitionToFinishedOnGlobalFailure() throws Exception {
+ void testTransitionToFinishedOnGlobalFailure() throws Exception {
final String testExceptionString = "This is a test exception";
try (MockContext ctx = new MockContext()) {
ctx.setHasDesiredResources(() -> false);
WaitingForResources wfr =
- new WaitingForResources(ctx, log, Duration.ZERO,
STABILIZATION_TIMEOUT);
+ new WaitingForResources(ctx, LOG, Duration.ZERO,
STABILIZATION_TIMEOUT);
ctx.setExpectFinished(
archivedExecutionGraph -> {
- assertThat(archivedExecutionGraph.getState(),
is(JobStatus.FAILED));
- assertThat(archivedExecutionGraph.getFailureInfo(),
notNullValue());
- assertTrue(
- archivedExecutionGraph
- .getFailureInfo()
- .getExceptionAsString()
- .contains(testExceptionString));
+
assertThat(archivedExecutionGraph.getState()).isEqualTo(JobStatus.FAILED);
+
assertThat(archivedExecutionGraph.getFailureInfo()).isNotNull();
+ assertThat(
+ archivedExecutionGraph
+ .getFailureInfo()
+ .getExceptionAsString()
+ .contains(testExceptionString))
+ .isTrue();
Review Comment:
That `isTrue()` is an odd change. But it will be cleaned up in the
subsequent commit because the test will be removed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]