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.27 by jsr166, Thu May 30 03:28:55 2013 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      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines