changeset 156:a9eec858c97b

More effective integration tests.
author shade
date Wed, 28 Aug 2013 16:03:53 +0400
parents c84f78395242
children 8ee765583a16
files jmh-core-it/src/test/java/org/openjdk/jmh/it/Fixtures.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/ZeroThreadCountTest.java
diffstat 4 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/Fixtures.java	Wed Aug 28 15:49:58 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/Fixtures.java	Wed Aug 28 16:03:53 2013 +0400
@@ -35,7 +35,7 @@
     public static void work() {
         // courtesy for parallel-running tests
         try {
-            TimeUnit.MILLISECONDS.sleep(10);
+            TimeUnit.MILLISECONDS.sleep(100);
         } catch (InterruptedException e) {
             throw new IllegalStateException(e);
         }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java	Wed Aug 28 15:49:58 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java	Wed Aug 28 16:03:53 2013 +0400
@@ -69,6 +69,7 @@
     @Threads(1)
     public void test1() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @GenerateMicroBenchmark
@@ -76,6 +77,7 @@
     @Warmup(iterations = 0)
     public void test2() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @Test
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java	Wed Aug 28 15:49:58 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java	Wed Aug 28 16:03:53 2013 +0400
@@ -69,6 +69,7 @@
     @Threads(2)
     public void test1() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @GenerateMicroBenchmark
@@ -76,6 +77,7 @@
     @Warmup(iterations = 0)
     public void test2() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @Test
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/ZeroThreadCountTest.java	Wed Aug 28 15:49:58 2013 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/ZeroThreadCountTest.java	Wed Aug 28 16:03:53 2013 +0400
@@ -69,6 +69,7 @@
     @Threads(0)
     public void test1() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @GenerateMicroBenchmark
@@ -76,6 +77,7 @@
     @Warmup(iterations = 0)
     public void test2() {
         threads.add(Thread.currentThread());
+        Fixtures.work();
     }
 
     @Test