GJL commented on a change in pull request #7974: [FLINK-11902][rest] Do not wrap all exceptions in RestHandlerException URL: https://github.com/apache/flink/pull/7974#discussion_r265156558
########## File path: flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarRunHandlerTest.java ########## @@ -90,6 +90,8 @@ public void testRunJar() throws Exception { if (expected.isPresent()) { // implies the job was actually submitted assertTrue(expected.get().getMessage().contains("ProgramInvocationException")); + // original cause is preserved in stack trace + assertTrue(expected.get().getMessage().contains("ZipException")); Review comment: I would prefer hamcrest for a proper failure message: ``` import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertThat; ... assertThat(expected.get().getMessage(), containsString("ZipException")) ``` ---------------------------------------------------------------- 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 With regards, Apache Git Services