ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java (file contents):
Revision 1.11 by jsr166, Sat Nov 21 19:31:58 2009 UTC vs.
Revision 1.15 by jsr166, Sat Nov 21 20:17:40 2009 UTC

# Line 1201 | Line 1201 | public class ThreadPoolExecutorSubclassT
1201              e.invokeAny(l);
1202              shouldThrow();
1203          } catch (ExecutionException success) {
1204 +            assertTrue(success.getCause() instanceof NullPointerException);
1205          } finally {
1206              joinPool(e);
1207          }
# Line 1280 | Line 1281 | public class ThreadPoolExecutorSubclassT
1281                  future.get();
1282              shouldThrow();
1283          } catch (ExecutionException success) {
1284 +            assertTrue(success.getCause() instanceof NullPointerException);
1285          } finally {
1286              joinPool(e);
1287          }
# Line 1353 | Line 1355 | public class ThreadPoolExecutorSubclassT
1355       * timed invokeAny(c) throws NPE if c has null elements
1356       */
1357      public void testTimedInvokeAny3() throws Exception {
1358 +        final CountDownLatch latch = new CountDownLatch(1);
1359          ExecutorService e = new CustomTPE(2, 2, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
1360          try {
1361              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
# Line 1368 | Line 1371 | public class ThreadPoolExecutorSubclassT
1371              shouldThrow();
1372          } catch (NullPointerException success) {
1373          } finally {
1374 +            latch.countDown();
1375              joinPool(e);
1376          }
1377      }
# Line 1383 | Line 1387 | public class ThreadPoolExecutorSubclassT
1387              e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS);
1388              shouldThrow();
1389          } catch (ExecutionException success) {
1390 +            assertTrue(success.getCause() instanceof NullPointerException);
1391          } finally {
1392              joinPool(e);
1393          }
# Line 1497 | Line 1502 | public class ThreadPoolExecutorSubclassT
1502              assertEquals(2, result.size());
1503              for (Future<String> future : result)
1504                  assertSame(TEST_STRING, future.get());
1500        } catch (ExecutionException success) {
1505          } finally {
1506              joinPool(e);
1507          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines