Skip to content

Commit

Permalink
[review] Simplifies assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
XComp committed Dec 6, 2021
1 parent 8aa2e83 commit 172e638
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.flink.runtime.rest.handler.legacy.utils.ArchivedExecutionGraphBuilder;
import org.apache.flink.runtime.scheduler.ExecutionGraphInfo;
import org.apache.flink.runtime.scheduler.exceptionhistory.RootExceptionHistoryEntry;
import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.util.SerializedThrowable;
import org.apache.flink.util.TestLogger;

Expand Down Expand Up @@ -138,14 +137,8 @@ private static void assertInitializationException(
actualException.deserializeError(Thread.currentThread().getContextClassLoader());

assertThat(deserializedException)
.isOfAnyClassIn(JobInitializationException.class)
.satisfies(
e ->
assertThat(
ExceptionUtils.findThrowable(
e, t -> t.equals(expectedCause))
.isPresent())
.isTrue());
.isInstanceOf(JobInitializationException.class)
.hasCause(expectedCause);

assertThat(actualTimestamp)
.isGreaterThanOrEqualTo(expectedLowerTimestampThreshold)
Expand Down

0 comments on commit 172e638

Please sign in to comment.