769 |
|
Runnable waiter = new CheckedRunnable() { public void realRun() { |
770 |
|
threadsStarted.countDown(); |
771 |
|
try { |
772 |
< |
MILLISECONDS.sleep(2 * LONG_DELAY_MS); |
772 |
> |
MILLISECONDS.sleep(LONGER_DELAY_MS); |
773 |
|
} catch (InterruptedException success) {} |
774 |
|
ran.getAndIncrement(); |
775 |
|
}}; |
1642 |
|
l.add(latchAwaitingStringTask(latch)); |
1643 |
|
l.add(null); |
1644 |
|
try { |
1645 |
< |
e.invokeAny(l, randomTimeout(), MILLISECONDS); |
1645 |
> |
e.invokeAny(l, randomTimeout(), randomTimeUnit()); |
1646 |
|
shouldThrow(); |
1647 |
|
} catch (NullPointerException success) {} |
1648 |
|
latch.countDown(); |
1967 |
|
} |
1968 |
|
} |
1969 |
|
|
1970 |
+ |
public void testFinalizeMethodCallsSuperFinalize() { |
1971 |
+ |
new CustomTPE(1, 1, |
1972 |
+ |
LONG_DELAY_MS, MILLISECONDS, |
1973 |
+ |
new LinkedBlockingQueue<Runnable>()) { |
1974 |
+ |
|
1975 |
+ |
/** |
1976 |
+ |
* A finalize method without "throws Throwable", that |
1977 |
+ |
* calls super.finalize(). |
1978 |
+ |
*/ |
1979 |
+ |
protected void finalize() { |
1980 |
+ |
super.finalize(); |
1981 |
+ |
} |
1982 |
+ |
}.shutdown(); |
1983 |
+ |
} |
1984 |
+ |
|
1985 |
|
} |