112 |
|
* methods as there are exceptions the method can throw. Sometimes |
113 |
|
* there are multiple tests per JSR166 method when the different |
114 |
|
* "normal" behaviors differ significantly. And sometimes testcases |
115 |
< |
* cover multiple methods when they cannot be tested in |
116 |
< |
* isolation. |
115 |
> |
* cover multiple methods when they cannot be tested in isolation. |
116 |
|
* |
117 |
|
* <li>The documentation style for testcases is to provide as javadoc |
118 |
|
* a simple sentence or two describing the property that the testcase |
175 |
|
private static final int suiteRuns = |
176 |
|
Integer.getInteger("jsr166.suiteRuns", 1); |
177 |
|
|
178 |
+ |
/** |
179 |
+ |
* The scaling factor to apply to standard delays used in tests. |
180 |
+ |
*/ |
181 |
+ |
private static final int delayFactor = |
182 |
+ |
Integer.getInteger("jsr166.delay.factor", 1); |
183 |
+ |
|
184 |
|
public JSR166TestCase() { super(); } |
185 |
|
public JSR166TestCase(String name) { super(name); } |
186 |
|
|
554 |
|
public static long LONG_DELAY_MS; |
555 |
|
|
556 |
|
/** |
557 |
< |
* Returns the shortest timed delay. This could |
558 |
< |
* be reimplemented to use for example a Property. |
557 |
> |
* Returns the shortest timed delay. This can be scaled up for |
558 |
> |
* slow machines using the jsr166.delay.factor system property. |
559 |
|
*/ |
560 |
|
protected long getShortDelay() { |
561 |
< |
return 50; |
561 |
> |
return 50 * delayFactor; |
562 |
|
} |
563 |
|
|
564 |
|
/** |