[cvs] / jsr166 / src / test / tck / ArrayBlockingQueueTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ArrayBlockingQueueTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22, Sat Nov 21 19:48:24 2009 UTC revision 1.23, Sat Nov 21 21:00:34 2009 UTC
# Line 472  Line 472 
472       */       */
473      public void testTimedPollWithOffer() throws InterruptedException {      public void testTimedPollWithOffer() throws InterruptedException {
474          final ArrayBlockingQueue q = new ArrayBlockingQueue(2);          final ArrayBlockingQueue q = new ArrayBlockingQueue(2);
475          Thread t = new ThreadShouldThrow(InterruptedException.class) {          Thread t = new Thread(new CheckedRunnable() {
476              public void realRun() throws InterruptedException {              public void realRun() throws InterruptedException {
477                  threadAssertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));                  assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
478                  q.poll(LONG_DELAY_MS, MILLISECONDS);                  assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
479                    try {
480                  q.poll(LONG_DELAY_MS, MILLISECONDS);                  q.poll(LONG_DELAY_MS, MILLISECONDS);
481              }};                      shouldThrow();
482                    } catch (InterruptedException success) {}
483                }});
484    
485          t.start();          t.start();
486          Thread.sleep(SMALL_DELAY_MS);          Thread.sleep(SMALL_DELAY_MS);

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8