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 { |
1240 |
|
public abstract class CheckedRecursiveAction extends RecursiveAction { |
1241 |
|
protected abstract void realCompute() throws Throwable; |
1242 |
|
|
1243 |
< |
public final void compute() { |
1243 |
> |
@Override protected final void compute() { |
1244 |
|
try { |
1245 |
|
realCompute(); |
1246 |
|
} catch (Throwable t) { |
1255 |
|
public abstract class CheckedRecursiveTask<T> extends RecursiveTask<T> { |
1256 |
|
protected abstract T realCompute() throws Throwable; |
1257 |
|
|
1258 |
< |
public final T compute() { |
1258 |
> |
@Override protected final T compute() { |
1259 |
|
try { |
1260 |
|
return realCompute(); |
1261 |
|
} catch (Throwable t) { |