tillrohrmann commented on a change in pull request #15503: URL: https://github.com/apache/flink/pull/15503#discussion_r608517368
########## File path: flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/reader/CoordinatedSourceRescaleITCase.java ########## @@ -72,7 +72,7 @@ private File generateCheckpoint(File checkpointDir, int p) throws IOException { env.execute("create checkpoint"); throw new AssertionError("No checkpoint"); } catch (Exception e) { - assertEquals(CREATED_CHECKPOINT, ExceptionUtils.getRootCause(e).getMessage()); + assertTrue(findThrowableWithMessage(e, CREATED_CHECKPOINT).isPresent()); Review comment: I'd suggest to use `assertThat(e, FlinkMatchers.containsMessage(CREATED_CHECKPOINT));` ########## File path: flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/reader/CoordinatedSourceRescaleITCase.java ########## @@ -92,7 +92,7 @@ private void resumeCheckpoint(File checkpointDir, File restoreCheckpoint, int p) env.execute("resume checkpoint"); throw new AssertionError("No success error"); } catch (Exception e) { - if (RESTORED_CHECKPOINT != ExceptionUtils.getRootCause(e).getMessage()) { + if (!findThrowableWithMessage(e, RESTORED_CHECKPOINT).isPresent()) { throw new AssertionError("Cannot resume", e); } Review comment: Could we rephrase this like `assertThat(e, FlinkMatchers.containsMessage(CREATED_CHECKPOINT));`? -- 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: us...@infra.apache.org