changeset 908:adbfd114a90b

jmh-core-it: additionally handle Runtime.getRuntime().exit/halt.
author shade
date Wed, 16 Jul 2014 21:19:06 +0400
parents 9d5a70899026
children dfed92d1c32b
files jmh-core-it/src/test/java/org/openjdk/jmh/it/errors/ForkedErrorsTest.java
diffstat 1 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/errors/ForkedErrorsTest.java	Wed Jul 16 21:04:31 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/errors/ForkedErrorsTest.java	Wed Jul 16 21:19:06 2014 +0400
@@ -87,6 +87,26 @@
         Thread.sleep(1);
     }
 
+    @Benchmark
+    public void test07_runtimeExit() throws InterruptedException {
+        Runtime.getRuntime().exit(1);
+    }
+
+    @Benchmark
+    public void test08_normal() throws InterruptedException {
+        Thread.sleep(1);
+    }
+
+    @Benchmark
+    public void test09_runtimeHalt() throws InterruptedException {
+        Runtime.getRuntime().halt(1);
+    }
+
+    @Benchmark
+    public void test10_normal() throws InterruptedException {
+        Thread.sleep(1);
+    }
+
     @Test
     public void test_FOE_false() throws RunnerException {
         Options opt = new OptionsBuilder()
@@ -96,7 +116,7 @@
                 .build();
         Collection<RunResult> results = new Runner(opt).run();
 
-        Assert.assertEquals(4, results.size());
+        Assert.assertEquals(6, results.size());
     }
 
     @Test