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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.101 by jsr166, Mon Oct 5 21:54:33 2015 UTC vs.
Revision 1.102 by jsr166, Mon Oct 5 22:09:02 2015 UTC

# Line 115 | Line 115 | public class ThreadPoolExecutorTest exte
115                      assertEquals(1, p.getActiveCount());
116                      done.await();
117                  }});
118 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
118 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
119              assertEquals(1, p.getActiveCount());
120              done.countDown();
121          }
# Line 344 | Line 344 | public class ThreadPoolExecutorTest exte
344                          done.await();
345                          assertEquals(THREADS, p.getLargestPoolSize());
346                      }});
347 <            assertTrue(threadsStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
347 >            assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS));
348              assertEquals(THREADS, p.getLargestPoolSize());
349              done.countDown();   // release pool
350          }
# Line 388 | Line 388 | public class ThreadPoolExecutorTest exte
388                      assertEquals(1, p.getPoolSize());
389                      done.await();
390                  }});
391 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
391 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
392              assertEquals(1, p.getPoolSize());
393              done.countDown();   // release pool
394          }
# Line 497 | Line 497 | public class ThreadPoolExecutorTest exte
497                      threadStarted.countDown();
498                      done.await();
499                  }});
500 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
500 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
501              assertFalse(p.isTerminating());
502              done.countDown();
503              try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 525 | Line 525 | public class ThreadPoolExecutorTest exte
525                      threadStarted.countDown();
526                      done.await();
527                  }});
528 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
528 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
529              assertFalse(p.isTerminating());
530              done.countDown();
531              try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 559 | Line 559 | public class ThreadPoolExecutorTest exte
559                  tasks[i] = new FutureTask(task);
560                  p.execute(tasks[i]);
561              }
562 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
562 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
563              assertSame(q, p.getQueue());
564              assertFalse(q.contains(tasks[0]));
565              assertTrue(q.contains(tasks[tasks.length - 1]));
# Line 589 | Line 589 | public class ThreadPoolExecutorTest exte
589                      }};
590                  p.execute(tasks[i]);
591              }
592 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
592 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
593              assertFalse(p.remove(tasks[0]));
594              assertTrue(q.contains(tasks[4]));
595              assertTrue(q.contains(tasks[3]));
# Line 1045 | Line 1045 | public class ThreadPoolExecutorTest exte
1045                      p.submit(task).get();
1046                  }});
1047  
1048 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
1048 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
1049              t.interrupt();
1050              awaitTermination(t, MEDIUM_DELAY_MS);
1051              done.countDown();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines