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

Comparing jsr166/src/test/tck/LinkedTransferQueueTest.java (file contents):
Revision 1.13 by jsr166, Sat Aug 15 00:48:10 2009 UTC vs.
Revision 1.16 by jsr166, Sat Nov 21 19:11:53 2009 UTC

# Line 13 | Line 13 | import java.io.ObjectInputStream;
13   import java.io.ObjectOutputStream;
14   import java.util.ArrayList;
15   import java.util.Arrays;
16 import java.util.ConcurrentModificationException;
16   import java.util.Iterator;
17   import java.util.List;
18   import java.util.NoSuchElementException;
# Line 355 | Line 354 | public class LinkedTransferQueueTest ext
354       */
355      public void testInterruptedTimedPoll() throws InterruptedException {
356          final LinkedTransferQueue<Integer> q = populatedQueue(SIZE);
357 <        Thread t = newStartedThread(new CheckedInterruptedRunnable() {
357 >        Thread t = newStartedThread(new CheckedRunnable() {
358              void realRun() throws InterruptedException {
359                  for (int i = 0; i < SIZE; ++i) {
360                      long t0 = System.nanoTime();
# Line 364 | Line 363 | public class LinkedTransferQueueTest ext
363                      long millisElapsed = (System.nanoTime() - t0)/(1024 * 1024);
364                      assertTrue(millisElapsed < SMALL_DELAY_MS);
365                  }
366 <                q.poll(LONG_DELAY_MS, MILLISECONDS);
366 >                try {
367 >                    q.poll(LONG_DELAY_MS, MILLISECONDS);
368 >                } catch (InterruptedException success) {}
369              }});
370          Thread.sleep(SMALL_DELAY_MS);
371          t.interrupt();
# Line 887 | Line 888 | public class LinkedTransferQueueTest ext
888              LinkedTransferQueue q = new LinkedTransferQueue();
889              q.transfer(null);
890              shouldThrow();
891 <        } catch (NullPointerException ex) {
891 <        }
891 >        } catch (NullPointerException success) {}
892      }
893  
894      /**
# Line 995 | Line 995 | public class LinkedTransferQueueTest ext
995              final LinkedTransferQueue q = new LinkedTransferQueue();
996              q.tryTransfer(null);
997              shouldThrow();
998 <        } catch (NullPointerException ex) {
999 <        }
998 >        } catch (NullPointerException success) {}
999      }
1000  
1001      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines