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

Comparing jsr166/src/test/tck/AtomicLongArrayTest.java (file contents):
Revision 1.26 by jsr166, Thu May 30 03:28:55 2013 UTC vs.
Revision 1.27 by jsr166, Tue Sep 24 18:50:44 2013 UTC

# Line 271 | Line 271 | public class AtomicLongArrayTest extends
271          }
272      }
273  
274    static final long COUNTDOWN = 100000;
275
274      class Counter extends CheckedRunnable {
275          final AtomicLongArray aa;
276          volatile long counts;
# Line 301 | Line 299 | public class AtomicLongArrayTest extends
299       */
300      public void testCountingInMultipleThreads() throws InterruptedException {
301          final AtomicLongArray aa = new AtomicLongArray(SIZE);
302 +        long countdown = 10000;
303          for (int i = 0; i < SIZE; i++)
304 <            aa.set(i, COUNTDOWN);
304 >            aa.set(i, countdown);
305          Counter c1 = new Counter(aa);
306          Counter c2 = new Counter(aa);
307          Thread t1 = new Thread(c1);
# Line 311 | Line 310 | public class AtomicLongArrayTest extends
310          t2.start();
311          t1.join();
312          t2.join();
313 <        assertEquals(c1.counts+c2.counts, SIZE * COUNTDOWN);
313 >        assertEquals(c1.counts+c2.counts, SIZE * countdown);
314      }
315  
316      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines