8133528: java/lang/ProcessHandle/OnExitTest.java fails intermittently
Summary: remove checks for processes not spawned by the test
Reviewed-by: joehw
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java Tue Sep 15 15:10:49 2015 -0700
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java Tue Sep 15 22:11:00 2015 -0400
@@ -96,8 +96,6 @@
ConcurrentHashMap<ProcessHandle, ProcessHandle> processes = new ConcurrentHashMap<>();
List<ProcessHandle> children = getChildren(ProcessHandle.current());
children.forEach(ProcessUtil::printProcess);
- Assert.assertEquals(children.size(), 0,
- "Expected to start with zero children; " + children);
JavaChild proc = JavaChild.spawnJavaChild("stdin");
procHandle = proc.toHandle();
@@ -186,10 +184,6 @@
children.forEach(p -> printProcess(p, "after onExit:"));
Assert.assertEquals(proc.isAlive(), false, "destroyed process is alive:: %s%n" + proc);
-
- List<ProcessHandle> children2 = getAllChildren(procHandle);
- printf(" children2: %s%n", children2.toString());
- Assert.assertEquals(children2.size(), 0, "After onExit, expected no children");
} catch (IOException | InterruptedException ex) {
Assert.fail(ex.getMessage());
} finally {