6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
+ |
/* |
10 |
+ |
* @test |
11 |
+ |
* @summary JSR-166 tck tests |
12 |
+ |
* @build * |
13 |
+ |
* @run junit/othervm/timeout=1000 -Djsr166.testImplementationDetails=true JSR166TestCase |
14 |
+ |
*/ |
15 |
+ |
|
16 |
|
import static java.util.concurrent.TimeUnit.MILLISECONDS; |
17 |
|
import static java.util.concurrent.TimeUnit.MINUTES; |
18 |
|
import static java.util.concurrent.TimeUnit.NANOSECONDS; |
182 |
|
private static final int suiteRuns = |
183 |
|
Integer.getInteger("jsr166.suiteRuns", 1); |
184 |
|
|
185 |
+ |
/** |
186 |
+ |
* The scaling factor to apply to standard delays used in tests. |
187 |
+ |
*/ |
188 |
+ |
private static final int delayFactor = |
189 |
+ |
Integer.getInteger("jsr166.delay.factor", 1); |
190 |
+ |
|
191 |
|
public JSR166TestCase() { super(); } |
192 |
|
public JSR166TestCase(String name) { super(name); } |
193 |
|
|
561 |
|
public static long LONG_DELAY_MS; |
562 |
|
|
563 |
|
/** |
564 |
< |
* Returns the shortest timed delay. This could |
565 |
< |
* be reimplemented to use for example a Property. |
564 |
> |
* Returns the shortest timed delay. This can be scaled up for |
565 |
> |
* slow machines using the jsr166.delay.factor system property. |
566 |
|
*/ |
567 |
|
protected long getShortDelay() { |
568 |
< |
return 50; |
568 |
> |
return 50 * delayFactor; |
569 |
|
} |
570 |
|
|
571 |
|
/** |