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