< prev index next >

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

Print this page

 27 import java.time.Instant;
 28 import java.util.ArrayList;
 29 import java.util.Arrays;
 30 import java.util.List;
 31 import java.util.Optional;
 32 import java.util.Set;
 33 import java.util.concurrent.ConcurrentHashMap;
 34 import java.util.concurrent.CountDownLatch;
 35 import java.util.concurrent.ExecutionException;
 36 import java.util.concurrent.TimeUnit;
 37 import java.util.stream.Collectors;
 38 import java.util.stream.Stream;
 39 
 40 import jdk.test.lib.Utils;
 41 import org.testng.Assert;
 42 import org.testng.TestNG;
 43 import org.testng.annotations.Test;
 44 
 45 /*
 46  * @test

 47  * @library /test/lib
 48  * @modules java.base/jdk.internal.misc
 49  *          jdk.management
 50  * @build jdk.test.lib.Utils
 51  *        jdk.test.lib.Asserts
 52  *        jdk.test.lib.JDKToolFinder
 53  *        jdk.test.lib.JDKToolLauncher
 54  *        jdk.test.lib.Platform
 55  *        jdk.test.lib.process.*
 56  * @run testng/othervm TreeTest
 57  * @summary Test counting and JavaChild.spawning and counting of Processes.
 58  * @author Roger Riggs
 59  */
 60 public class TreeTest extends ProcessUtil {
 61     // Main can be used to run the tests from the command line with only testng.jar.
 62     @SuppressWarnings("raw_types")
 63     public static void main(String[] args) {
 64         Class<?>[] testclass = {TreeTest.class};
 65         TestNG testng = new TestNG();
 66         testng.setTestClasses(testclass);

 27 import java.time.Instant;
 28 import java.util.ArrayList;
 29 import java.util.Arrays;
 30 import java.util.List;
 31 import java.util.Optional;
 32 import java.util.Set;
 33 import java.util.concurrent.ConcurrentHashMap;
 34 import java.util.concurrent.CountDownLatch;
 35 import java.util.concurrent.ExecutionException;
 36 import java.util.concurrent.TimeUnit;
 37 import java.util.stream.Collectors;
 38 import java.util.stream.Stream;
 39 
 40 import jdk.test.lib.Utils;
 41 import org.testng.Assert;
 42 import org.testng.TestNG;
 43 import org.testng.annotations.Test;
 44 
 45 /*
 46  * @test
 47  * @requires vm.flagless
 48  * @library /test/lib
 49  * @modules java.base/jdk.internal.misc
 50  *          jdk.management
 51  * @build jdk.test.lib.Utils
 52  *        jdk.test.lib.Asserts
 53  *        jdk.test.lib.JDKToolFinder
 54  *        jdk.test.lib.JDKToolLauncher
 55  *        jdk.test.lib.Platform
 56  *        jdk.test.lib.process.*
 57  * @run testng/othervm TreeTest
 58  * @summary Test counting and JavaChild.spawning and counting of Processes.
 59  * @author Roger Riggs
 60  */
 61 public class TreeTest extends ProcessUtil {
 62     // Main can be used to run the tests from the command line with only testng.jar.
 63     @SuppressWarnings("raw_types")
 64     public static void main(String[] args) {
 65         Class<?>[] testclass = {TreeTest.class};
 66         TestNG testng = new TestNG();
 67         testng.setTestClasses(testclass);
< prev index next >