< prev index next >

test/java/lang/ProcessHandle/OnExitTest.java

Print this page
rev 17324 : 8181759: add explicit @build actions for jdk.test.lib classes in all :tier1 tests
Reviewed-by: duke


  26 import java.time.Instant;
  27 import java.util.ArrayList;
  28 import java.util.List;
  29 import java.util.concurrent.ArrayBlockingQueue;
  30 import java.util.concurrent.CompletableFuture;
  31 import java.util.concurrent.ConcurrentHashMap;
  32 import java.util.concurrent.ExecutionException;
  33 import java.util.concurrent.TimeUnit;
  34 
  35 import jdk.test.lib.Utils;
  36 
  37 import org.testng.annotations.Test;
  38 import org.testng.Assert;
  39 import org.testng.TestNG;
  40 
  41 /*
  42  * @test
  43  * @library /test/lib
  44  * @modules java.base/jdk.internal.misc
  45  *          jdk.management
  46  * @build jdk.test.lib.Platform jdk.test.lib.Utils





  47  * @run testng OnExitTest
  48  * @summary Functions of Process.onExit and ProcessHandle.onExit
  49  * @author Roger Riggs
  50  */
  51 
  52 public class OnExitTest extends ProcessUtil {
  53 
  54     @SuppressWarnings("raw_types")
  55     public static void main(String[] args) {
  56         Class<?>[] testclass = { OnExitTest.class};
  57         TestNG testng = new TestNG();
  58         testng.setTestClasses(testclass);
  59         testng.run();
  60     }
  61 
  62     /**
  63      * Basic test of exitValue and onExit.
  64      */
  65     @Test
  66     public static void test1() {




  26 import java.time.Instant;
  27 import java.util.ArrayList;
  28 import java.util.List;
  29 import java.util.concurrent.ArrayBlockingQueue;
  30 import java.util.concurrent.CompletableFuture;
  31 import java.util.concurrent.ConcurrentHashMap;
  32 import java.util.concurrent.ExecutionException;
  33 import java.util.concurrent.TimeUnit;
  34 
  35 import jdk.test.lib.Utils;
  36 
  37 import org.testng.annotations.Test;
  38 import org.testng.Assert;
  39 import org.testng.TestNG;
  40 
  41 /*
  42  * @test
  43  * @library /test/lib
  44  * @modules java.base/jdk.internal.misc
  45  *          jdk.management
  46  * @build jdk.test.lib.Utils
  47  *        jdk.test.lib.Asserts
  48  *        jdk.test.lib.JDKToolFinder
  49  *        jdk.test.lib.JDKToolLauncher
  50  *        jdk.test.lib.Platform
  51  *        jdk.test.lib.process.*
  52  * @run testng OnExitTest
  53  * @summary Functions of Process.onExit and ProcessHandle.onExit
  54  * @author Roger Riggs
  55  */
  56 
  57 public class OnExitTest extends ProcessUtil {
  58 
  59     @SuppressWarnings("raw_types")
  60     public static void main(String[] args) {
  61         Class<?>[] testclass = { OnExitTest.class};
  62         TestNG testng = new TestNG();
  63         testng.setTestClasses(testclass);
  64         testng.run();
  65     }
  66 
  67     /**
  68      * Basic test of exitValue and onExit.
  69      */
  70     @Test
  71     public static void test1() {


< prev index next >