24 import java.io.IOException;
25 import java.time.Duration;
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 * @build jdk.test.lib.Utils
45 * @run testng OnExitTest
46 * @summary Functions of Process.onExit and ProcessHandle.onExit
47 * @author Roger Riggs
48 */
49
50 public class OnExitTest extends ProcessUtil {
51
52 @SuppressWarnings("raw_types")
53 public static void main(String[] args) {
54 Class<?>[] testclass = { OnExitTest.class};
55 TestNG testng = new TestNG();
56 testng.setTestClasses(testclass);
57 testng.run();
58 }
59
60 /**
61 * Basic test of exitValue and onExit.
62 */
63 @Test
|
24 import java.io.IOException;
25 import java.time.Duration;
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 jdk.management
45 * @build jdk.test.lib.Utils
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
|