< prev index next >

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




  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  * @run testng/othervm TreeTest
  52  * @summary Test counting and JavaChild.spawning and counting of Processes.
  53  * @author Roger Riggs
  54  */
  55 public class TreeTest extends ProcessUtil {
  56     // Main can be used to run the tests from the command line with only testng.jar.
  57     @SuppressWarnings("raw_types")
  58     public static void main(String[] args) {
  59         Class<?>[] testclass = {TreeTest.class};
  60         TestNG testng = new TestNG();
  61         testng.setTestClasses(testclass);
  62         testng.run();
  63     }
  64 
  65     /**
  66      * Test counting and spawning and counting of Processes.
  67      */


< prev index next >