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

Comparing jsr166/src/test/tck/CountDownLatchTest.java (file contents):
Revision 1.11 by jsr166, Sat Nov 21 02:07:26 2009 UTC vs.
Revision 1.12 by jsr166, Sat Nov 21 02:33:20 2009 UTC

# Line 9 | Line 9
9   import junit.framework.*;
10   import java.util.*;
11   import java.util.concurrent.*;
12 + import static java.util.concurrent.TimeUnit.MILLISECONDS;
13  
14   public class CountDownLatchTest extends JSR166TestCase {
15      public static void main(String[] args) {
# Line 92 | Line 93 | public class CountDownLatchTest extends
93                  public void run() {
94                      try {
95                          threadAssertTrue(l.getCount() > 0);
96 <                        threadAssertTrue(l.await(SMALL_DELAY_MS, TimeUnit.MILLISECONDS));
96 >                        threadAssertTrue(l.await(SMALL_DELAY_MS, MILLISECONDS));
97                      } catch (InterruptedException e) {
98                          threadUnexpectedException();
99                      }
# Line 145 | Line 146 | public class CountDownLatchTest extends
146                  public void run() {
147                      try {
148                          threadAssertTrue(l.getCount() > 0);
149 <                        l.await(MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
149 >                        l.await(MEDIUM_DELAY_MS, MILLISECONDS);
150                          threadShouldThrow();
151                      } catch (InterruptedException success) {}
152                  }
# Line 170 | Line 171 | public class CountDownLatchTest extends
171                  public void run() {
172                      try {
173                          threadAssertTrue(l.getCount() > 0);
174 <                        threadAssertFalse(l.await(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));
174 >                        threadAssertFalse(l.await(SHORT_DELAY_MS, MILLISECONDS));
175                          threadAssertTrue(l.getCount() > 0);
176                      } catch (InterruptedException ie) {
177                          threadUnexpectedException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines