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.76 by jsr166, Sun May 14 00:48:20 2017 UTC vs.
Revision 1.79 by jsr166, Fri Aug 4 03:30:21 2017 UTC

# Line 282 | Line 282 | public class LinkedTransferQueueTest ext
282          Thread t = newStartedThread(new CheckedRunnable() {
283              public void realRun() throws InterruptedException {
284                  long startTime = System.nanoTime();
285 <                for (int i = 0; i < SIZE; ++i)
285 >                for (int i = 0; i < SIZE; i++)
286                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
287  
288 +                Thread.currentThread().interrupt();
289 +                try {
290 +                    q.poll(LONG_DELAY_MS, MILLISECONDS);
291 +                    shouldThrow();
292 +                } catch (InterruptedException success) {}
293 +                assertFalse(Thread.interrupted());
294 +
295                  pleaseInterrupt.countDown();
296                  try {
297                      q.poll(LONG_DELAY_MS, MILLISECONDS);
# Line 318 | Line 325 | public class LinkedTransferQueueTest ext
325                      q.poll(LONG_DELAY_MS, MILLISECONDS);
326                      shouldThrow();
327                  } catch (InterruptedException success) {}
328 +                assertFalse(Thread.interrupted());
329                  assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
330              }});
331  
# Line 639 | Line 647 | public class LinkedTransferQueueTest ext
647      }
648  
649      /**
650 <     * A deserialized serialized queue has same elements in same order
650 >     * A deserialized/reserialized queue has same elements in same order
651       */
652      public void testSerialization() throws Exception {
653          Queue x = populatedQueue(SIZE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines