Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,11 @@ private void stopRemoteClipboardCommands() throws Exception {
} finally {
if (remoteClipboardProcess != null) {
try {
remoteClipboardProcess.waitFor(1, TimeUnit.SECONDS);
remoteClipboardProcess.destroy();
assertTrue(remoteClipboardProcess.waitFor(10, TimeUnit.SECONDS));
} finally {
remoteClipboardProcess.destroyForcibly();
assertTrue(remoteClipboardProcess.waitFor(10, TimeUnit.SECONDS));
remoteClipboardProcess = null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ public void stop() throws RemoteException {
clipboardTest.log("stop()");
clipboardTest.dispose();
});
// Force the test program to quit, but after a short delay so that
// the return value of stop can make it back to the caller and
// the JUnit test may destroy the process before this sleep
// expires anyway
SwingUtilities.invokeLater(() -> {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.interrupted();
}
System.exit(0);
});
}

@Override
Expand Down
Loading