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

Comparing jsr166/src/test/tck/ArrayBlockingQueueTest.java (file contents):
Revision 1.6 by dl, Sun Oct 5 23:00:39 2003 UTC vs.
Revision 1.10 by dl, Thu Jan 8 01:29:46 2004 UTC

# Line 1 | Line 1
1   /*
2 < * Written by members of JCP JSR-166 Expert Group and released to the
3 < * public domain. Use, modify, and redistribute this code in any way
4 < * without acknowledgement. Other contributors include Andrew Wright,
5 < * Jeffrey Hayes, Pat Fischer, Mike Judd.
2 > * Written by Doug Lea with assistance from members of JCP JSR-166
3 > * Expert Group and released to the public domain, as explained at
4 > * http://creativecommons.org/licenses/publicdomain
5 > * Other contributors include Andrew Wright, Jeffrey Hayes,
6 > * Pat Fisher, Mike Judd.
7   */
8  
9  
# Line 318 | Line 319 | public class ArrayBlockingQueueTest exte
319       * put blocks interruptibly if full
320       */
321      public void testBlockingPut() {
322 +        final ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE);
323          Thread t = new Thread(new Runnable() {
324                  public void run() {
325                      int added = 0;
326                      try {
325                        ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE);
327                          for (int i = 0; i < SIZE; ++i) {
328                              q.put(new Integer(i));
329                              ++added;
# Line 335 | Line 336 | public class ArrayBlockingQueueTest exte
336                  }});
337          try {
338              t.start();
339 <           Thread.sleep(SHORT_DELAY_MS);
339 >           Thread.sleep(MEDIUM_DELAY_MS);
340             t.interrupt();
341             t.join();
342          }
# Line 743 | Line 744 | public class ArrayBlockingQueueTest exte
744      }
745  
746      /**
747 <     * toArray with incompatable array type throws CCE
747 >     * toArray with incompatible array type throws CCE
748       */
749      public void testToArray1_BadArg() {
750          try {
# Line 993 | Line 994 | public class ArrayBlockingQueueTest exte
994              for (int i = 0; i < SIZE; ++i)
995                  assertEquals(l.get(i), new Integer(i));
996              t.join();
997 <            assertTrue(q.size() + l.size() == SIZE+1);
997 >            assertTrue(q.size() + l.size() >= SIZE);
998          } catch(Exception e){
999              unexpectedException();
1000          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines