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.28 by jsr166, Thu Oct 28 17:57:26 2010 UTC vs.
Revision 1.29 by jsr166, Thu Oct 28 19:05:04 2010 UTC

# Line 292 | Line 292 | public class LinkedTransferQueueTest ext
292          t.start();
293          Thread.sleep(SHORT_DELAY_MS);
294          t.interrupt();
295 <        t.join();
295 >        awaitTermination(t, MEDIUM_DELAY_MS);
296          checkEmpty(q);
297      }
298  
# Line 355 | Line 355 | public class LinkedTransferQueueTest ext
355  
356          Thread.sleep(SMALL_DELAY_MS);
357          t.interrupt();
358 <        t.join();
358 >        awaitTermination(t, MEDIUM_DELAY_MS);
359          checkEmpty(q);
360      }
361  
# Line 765 | Line 765 | public class LinkedTransferQueueTest ext
765          for (int i = 0; i < SIZE; ++i) {
766              assertEquals(l.get(i), i);
767          }
768 <        t.join();
768 >        awaitTermination(t, MEDIUM_DELAY_MS);
769          assertTrue(q.size() + l.size() >= SIZE);
770      }
771  
# Line 835 | Line 835 | public class LinkedTransferQueueTest ext
835          assertSame(one, q.poll(LONG_DELAY_MS, MILLISECONDS));
836          assertEquals(q.getWaitingConsumerCount(), 0);
837          assertFalse(q.hasWaitingConsumer());
838 <        t.join();
838 >        awaitTermination(t, MEDIUM_DELAY_MS);
839      }
840  
841      /**
# Line 867 | Line 867 | public class LinkedTransferQueueTest ext
867          assertEquals(1, q.size());
868          assertEquals(SIZE, (int) q.poll());
869          assertTrue(q.isEmpty());
870 <        t.join();
870 >        awaitTermination(t, MEDIUM_DELAY_MS);
871      }
872  
873      /**
# Line 922 | Line 922 | public class LinkedTransferQueueTest ext
922          Thread.sleep(SHORT_DELAY_MS);
923          assertTrue(q.offer(three));
924          assertSame(four, q.poll());
925 <        t.join();
925 >        awaitTermination(t, MEDIUM_DELAY_MS);
926      }
927  
928      /**
# Line 942 | Line 942 | public class LinkedTransferQueueTest ext
942          Thread.sleep(SHORT_DELAY_MS);
943          assertEquals(SIZE, (int) q.take());
944          checkEmpty(q);
945 <        t.join();
945 >        awaitTermination(t, MEDIUM_DELAY_MS);
946      }
947  
948      /**
# Line 987 | Line 987 | public class LinkedTransferQueueTest ext
987  
988          assertSame(hotPotato, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
989          checkEmpty(q);
990 <        t.join();
990 >        awaitTermination(t, MEDIUM_DELAY_MS);
991      }
992  
993      /**
# Line 1010 | Line 1010 | public class LinkedTransferQueueTest ext
1010  
1011          assertSame(q.take(), hotPotato);
1012          checkEmpty(q);
1013 <        t.join();
1013 >        awaitTermination(t, MEDIUM_DELAY_MS);
1014      }
1015  
1016      /**
# Line 1068 | Line 1068 | public class LinkedTransferQueueTest ext
1068          assertSame(four, q.poll());
1069          assertSame(five, q.poll());
1070          checkEmpty(q);
1071 <        t.join();
1071 >        awaitTermination(t, MEDIUM_DELAY_MS);
1072      }
1073  
1074      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines