< prev index next >

test/java/lang/ProcessHandle/OnExitTest.java

Print this page
rev 17272 : 8181391: remove explicit @build actions for the top level testlibary classes
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  * @run testng OnExitTest
  47  * @summary Functions of Process.onExit and ProcessHandle.onExit
  48  * @author Roger Riggs
  49  */
  50 
  51 public class OnExitTest extends ProcessUtil {
  52 
  53     @SuppressWarnings("raw_types")
  54     public static void main(String[] args) {
  55         Class<?>[] testclass = { OnExitTest.class};
  56         TestNG testng = new TestNG();
  57         testng.setTestClasses(testclass);
  58         testng.run();
  59     }
  60 
  61     /**
  62      * Basic test of exitValue and onExit.
  63      */
  64     @Test
  65     public static void test1() {


< prev index next >