8133528: java/lang/ProcessHandle/OnExitTest.java fails intermittently
authorrriggs
Tue, 15 Sep 2015 22:11:00 -0400
changeset 32657 8c49f68497e3
parent 32645 32e2fd6206d1
child 32658 dc687d3e31ab
8133528: java/lang/ProcessHandle/OnExitTest.java fails intermittently Summary: remove checks for processes not spawned by the test Reviewed-by: joehw
jdk/test/java/lang/ProcessHandle/OnExitTest.java
--- 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 {