changeset 59:813ec6837fa3

Get easier on race tests, trade in testing duration.
author shade
date Fri, 31 May 2013 15:45:14 +0400
parents 5058ac94c040
children c2a1db5e3fe1
files jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceBenchmarkStateInvocationTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceGroupStateInvocationTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceThreadStateInvocationTest.java
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceBenchmarkStateInvocationTest.java	Fri May 31 15:29:22 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceBenchmarkStateInvocationTest.java	Fri May 31 15:45:14 2013 +0400
@@ -59,11 +59,12 @@
 
     @GenerateMicroBenchmark(BenchmarkType.All)
     @Warmup(iterations = 0)
-    @Measurement(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS)
+    @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
     @Threads(4)
     public void test(MyState state) {
         // Useless to test this condition here, intrinsic races.
 //        Assert.assertEquals("Run", 1, state.value);
+        Fixtures.work();
     }
 
     @Test
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceGroupStateInvocationTest.java	Fri May 31 15:29:22 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceGroupStateInvocationTest.java	Fri May 31 15:45:14 2013 +0400
@@ -59,11 +59,12 @@
 
     @GenerateMicroBenchmark(BenchmarkType.All)
     @Warmup(iterations = 0)
-    @Measurement(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS)
+    @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
     @Threads(4)
     public void test(MyState state) {
        // Useless to test this condition here, intrinsic races.
 //        Assert.assertEquals("Run", 1, state.value);
+        Fixtures.work();
     }
 
     @Test
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceThreadStateInvocationTest.java	Fri May 31 15:29:22 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/races/RaceThreadStateInvocationTest.java	Fri May 31 15:45:14 2013 +0400
@@ -59,10 +59,11 @@
 
     @GenerateMicroBenchmark(BenchmarkType.All)
     @Warmup(iterations = 0)
-    @Measurement(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS)
+    @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
     @Threads(4)
     public void test(MyState state) {
         Assert.assertEquals("Run", 1, state.value);
+        Fixtures.work();
     }
 
     @Test