X-czh commented on code in PR #23198:
URL: https://github.com/apache/flink/pull/23198#discussion_r1296189640
##########
flink-runtime/src/test/java/org/apache/flink/runtime/testutils/TestJvmProcess.java:
##########
@@ -316,18 +317,16 @@ public static void waitForMarkerFile(File file, long
timeoutMillis)
Thread.sleep(10);
}
- if (!exists) {
- fail("The marker file was not found within " + timeoutMillis + "
msecs");
- }
+ assertThat(exists)
+ .as("The marker file was not found within " + timeoutMillis +
" msecs")
+ .isTrue();
}
public static void killProcessWithSigTerm(long pid) throws Exception {
// send it a regular kill command (SIG_TERM)
final Process kill = Runtime.getRuntime().exec("kill " + pid);
kill.waitFor();
- if (kill.exitValue() != 0) {
- fail("failed to send SIG_TERM to process " + pid);
- }
+ assertThat(kill.exitValue()).as("failed to send SIG_TERM to process "
+ pid).isZero();
Review Comment:
same here
--
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]