Skip to content

Commit dd7fd03

Browse files
author
duke
committedAug 30, 2023
Automatic merge of jdk:master into master
2 parents 259f84e + f3aeb02 commit dd7fd03

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
 

‎test/jdk/java/lang/ProcessHandle/TreeTest.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -444,16 +444,21 @@ public static void test5() {
444444
Assert.assertEquals(0, count, "Extra processes in descendants");
445445
}
446446

447+
List<ProcessHandle> subprocesses = getChildren(p1Handle);
448+
printf(" children: %s%n",
449+
subprocesses.stream().map(p -> p.pid())
450+
.collect(Collectors.toList()));
451+
447452
Assert.assertEquals(getChildren(p1Handle).size(),
448453
factor, "expected direct children");
449454
count = getDescendants(p1Handle).size();
450455
long totalChildren = factor * factor * factor + factor * factor + factor;
451456
Assert.assertTrue(count >= totalChildren,
452457
"expected at least " + totalChildren + ", actual: " + count);
453458

454-
List<ProcessHandle> subprocesses = getDescendants(p1Handle);
459+
List<ProcessHandle> descSubprocesses = getDescendants(p1Handle);
455460
printf(" descendants: %s%n",
456-
subprocesses.stream().map(p -> p.pid())
461+
descSubprocesses.stream().map(p -> p.pid())
457462
.collect(Collectors.toList()));
458463

459464
p1.getOutputStream().close(); // Close stdin for the controlling p1

0 commit comments

Comments
 (0)
Please sign in to comment.