Skip to content

Commit

Permalink
[FLINK-27703][core] Extend timeout and add logs for FileChannelManage…
Browse files Browse the repository at this point in the history
…rImplTest

This closes apache#20239.
  • Loading branch information
gaoyunhaii authored and HuangXingBo committed Jul 14, 2022
1 parent f23ae51 commit 4f7ebbb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void testDirectoriesCleanupOnKill(boolean callerHasHook) throws Exceptio

// Waits till the process has created temporary files and registered the corresponding
// shutdown hooks.
TestJvmProcess.waitForMarkerFile(signalFile, TEST_TIMEOUT.toMillis());
TestJvmProcess.waitForMarkerFile(signalFile, 3 * TEST_TIMEOUT.toMillis());

Process kill =
Runtime.getRuntime()
Expand Down Expand Up @@ -196,6 +196,8 @@ public static void main(String[] args) throws Exception {
String tmpDirectory = args[1];
String signalFilePath = args[2];

LOG.info("The FileChannelManagerCleanupRunner process has started");

FileChannelManager manager =
new FileChannelManagerImpl(new String[] {tmpDirectory}, DIR_NAME_PREFIX);

Expand All @@ -205,9 +207,13 @@ public static void main(String[] args) throws Exception {
ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
}

LOG.info("The FileChannelManagerCleanupRunner is going to create the new file");

// Signals the main process to execute the kill action.
new File(signalFilePath).createNewFile();

LOG.info("The FileChannelManagerCleanupRunner has created the new file");

// Blocks the process to wait to be killed.
Thread.sleep(3 * TEST_TIMEOUT.toMillis());
}
Expand Down

0 comments on commit 4f7ebbb

Please sign in to comment.