--- jsr166/src/test/tck/JSR166TestCase.java 2015/11/09 05:43:39 1.180 +++ jsr166/src/test/tck/JSR166TestCase.java 2016/01/23 20:15:28 1.183 @@ -6,6 +6,13 @@ * Pat Fisher, Mike Judd. */ +/* + * @test + * @summary JSR-166 tck tests + * @build * + * @run junit/othervm/timeout=1000 -Djsr166.testImplementationDetails=true JSR166TestCase + */ + import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.NANOSECONDS; @@ -175,6 +182,12 @@ public class JSR166TestCase extends Test private static final int suiteRuns = Integer.getInteger("jsr166.suiteRuns", 1); + /** + * The scaling factor to apply to standard delays used in tests. + */ + private static final int delayFactor = + Integer.getInteger("jsr166.delay.factor", 1); + public JSR166TestCase() { super(); } public JSR166TestCase(String name) { super(name); } @@ -548,11 +561,11 @@ public class JSR166TestCase extends Test public static long LONG_DELAY_MS; /** - * Returns the shortest timed delay. This could - * be reimplemented to use for example a Property. + * Returns the shortest timed delay. This can be scaled up for + * slow machines using the jsr166.delay.factor system property. */ protected long getShortDelay() { - return 50; + return 50 * delayFactor; } /**