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.22 by jsr166, Wed Dec 31 19:05:42 2014 UTC vs.
Revision 1.25 by jsr166, Sun May 14 01:37:52 2017 UTC

# Line 18 | Line 18 | import junit.framework.TestSuite;
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 65 | Line 65 | public class ExchangerTest extends JSR16
65      }
66  
67      /**
68 <     * interrupt during wait for exchange throws IE
68 >     * interrupt during wait for exchange throws InterruptedException
69       */
70      public void testExchange_InterruptedException() {
71          final Exchanger e = new Exchanger();
# Line 82 | Line 82 | public class ExchangerTest extends JSR16
82      }
83  
84      /**
85 <     * interrupt during wait for timed exchange throws IE
85 >     * interrupt during wait for timed exchange throws InterruptedException
86       */
87      public void testTimedExchange_InterruptedException() {
88          final Exchanger e = new Exchanger();
# Line 133 | 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