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

Comparing jsr166/src/test/tck/AtomicIntegerArrayTest.java (file contents):
Revision 1.26 by jsr166, Wed Aug 10 07:14:48 2011 UTC vs.
Revision 1.28 by jsr166, Tue Sep 24 18:50:44 2013 UTC

# Line 272 | Line 272 | public class AtomicIntegerArrayTest exte
272          }
273      }
274  
275    static final int COUNTDOWN = 100000;
276
275      class Counter extends CheckedRunnable {
276          final AtomicIntegerArray aa;
277          volatile int counts;
# Line 302 | Line 300 | public class AtomicIntegerArrayTest exte
300       */
301      public void testCountingInMultipleThreads() throws InterruptedException {
302          final AtomicIntegerArray aa = new AtomicIntegerArray(SIZE);
303 +        int countdown = 10000;
304          for (int i = 0; i < SIZE; i++)
305 <            aa.set(i, COUNTDOWN);
305 >            aa.set(i, countdown);
306          Counter c1 = new Counter(aa);
307          Counter c2 = new Counter(aa);
308          Thread t1 = new Thread(c1);
# Line 312 | Line 311 | public class AtomicIntegerArrayTest exte
311          t2.start();
312          t1.join();
313          t2.join();
314 <        assertEquals(c1.counts+c2.counts, SIZE * COUNTDOWN);
314 >        assertEquals(c1.counts+c2.counts, SIZE * countdown);
315      }
316  
317      /**
# Line 323 | Line 322 | public class AtomicIntegerArrayTest exte
322          for (int i = 0; i < SIZE; i++)
323              x.set(i, -i);
324          AtomicIntegerArray y = serialClone(x);
325 <        assertTrue(x != y);
325 >        assertNotSame(x, y);
326          assertEquals(x.length(), y.length());
327          for (int i = 0; i < SIZE; i++) {
328              assertEquals(x.get(i), y.get(i));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines