ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.106 by jsr166, Mon Apr 1 20:06:26 2013 UTC vs.
Revision 1.111 by dl, Sun Jul 21 22:24:18 2013 UTC

# Line 128 | Line 128 | public class JSR166TestCase extends Test
128      private static final long profileThreshold =
129          Long.getLong("jsr166.profileThreshold", 100);
130  
131 +    /**
132 +     * The number of repetitions per test (for tickling rare bugs).
133 +     */
134 +    private static final int runsPerTest =
135 +        Integer.getInteger("jsr166.runsPerTest", 1);
136 +
137      protected void runTest() throws Throwable {
138 <        if (profileTests)
139 <            runTestProfiled();
140 <        else
141 <            super.runTest();
138 >        for (int i = 0; i < runsPerTest; i++) {
139 >            if (profileTests)
140 >                runTestProfiled();
141 >            else
142 >                super.runTest();
143 >        }
144      }
145  
146      protected void runTestProfiled() throws Throwable {
# Line 292 | Line 300 | public class JSR166TestCase extends Test
300                  "DoubleAccumulatorTest",
301                  "DoubleAdderTest",
302                  "ForkJoinPool8Test",
303 +                "ForkJoinTask8Test",
304                  "LongAccumulatorTest",
305                  "LongAdderTest",
306 +                "SplittableRandomTest",
307                  "StampedLockTest",
308              };
309              addNamedTestClasses(suite, java8TestClassNames);
# Line 302 | Line 312 | public class JSR166TestCase extends Test
312          return suite;
313      }
314  
315 +    // Delays for timing-dependent tests, in milliseconds.
316  
317      public static long SHORT_DELAY_MS;
318      public static long SMALL_DELAY_MS;
319      public static long MEDIUM_DELAY_MS;
320      public static long LONG_DELAY_MS;
321  
311
322      /**
323       * Returns the shortest timed delay. This could
324       * be reimplemented to use for example a Property.
# Line 701 | Line 711 | public class JSR166TestCase extends Test
711      public static final Integer m6  = new Integer(-6);
712      public static final Integer m10 = new Integer(-10);
713  
704
714      /**
715       * Runs Runnable r with a security policy that permits precisely
716       * the specified permissions.  If there is no current security
# Line 1232 | Line 1241 | public class JSR166TestCase extends Test
1241      public abstract class CheckedRecursiveAction extends RecursiveAction {
1242          protected abstract void realCompute() throws Throwable;
1243  
1244 <        public final void compute() {
1244 >        @Override protected final void compute() {
1245              try {
1246                  realCompute();
1247              } catch (Throwable t) {
# Line 1247 | Line 1256 | public class JSR166TestCase extends Test
1256      public abstract class CheckedRecursiveTask<T> extends RecursiveTask<T> {
1257          protected abstract T realCompute() throws Throwable;
1258  
1259 <        public final T compute() {
1259 >        @Override protected final T compute() {
1260              try {
1261                  return realCompute();
1262              } catch (Throwable t) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines