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

Comparing jsr166/src/test/tck/ExchangerTest.java (file contents):
Revision 1.21 by jsr166, Tue May 31 16:16:23 2011 UTC vs.
Revision 1.24 by jsr166, Sat Mar 25 21:41:10 2017 UTC

# Line 6 | Line 6
6   * Pat Fisher, Mike Judd.
7   */
8  
9 < import junit.framework.*;
10 < import java.util.*;
9 > import static java.util.concurrent.TimeUnit.MILLISECONDS;
10 >
11   import java.util.concurrent.CountDownLatch;
12   import java.util.concurrent.Exchanger;
13   import java.util.concurrent.TimeoutException;
14 < import static java.util.concurrent.TimeUnit.MILLISECONDS;
14 >
15 > import junit.framework.Test;
16 > import junit.framework.TestSuite;
17  
18   public class ExchangerTest extends JSR166TestCase {
19  
20      public static void main(String[] args) {
21 <        junit.textui.TestRunner.run(suite());
21 >        main(suite(), args);
22      }
23      public static Test suite() {
24          return new TestSuite(ExchangerTest.class);
# Line 131 | Line 133 | public class ExchangerTest extends JSR16
133              public void realRun() throws InterruptedException {
134                  assertSame(one, e.exchange(two));
135                  exchanged.countDown();
136 <                interrupted.await();
136 >                await(interrupted);
137                  assertSame(three, e.exchange(one));
138              }});
139          Thread t3 = newStartedThread(new CheckedRunnable() {
140              public void realRun() throws InterruptedException {
141 <                interrupted.await();
141 >                await(interrupted);
142                  assertSame(one, e.exchange(three));
143              }});
144  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines