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

Comparing jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java (file contents):
Revision 1.47 by jsr166, Wed Dec 31 19:05:42 2014 UTC vs.
Revision 1.51 by jsr166, Fri Jul 3 01:56:38 2015 UTC

# Line 21 | Line 21 | import junit.framework.TestSuite;
21  
22   public class AbstractQueuedSynchronizerTest extends JSR166TestCase {
23      public static void main(String[] args) {
24 <        junit.textui.TestRunner.run(suite());
24 >        main(suite(), args);
25      }
26      public static Test suite() {
27          return new TestSuite(AbstractQueuedSynchronizerTest.class);
# Line 228 | Line 228 | public class AbstractQueuedSynchronizerT
228          case awaitUntil:
229              assertTrue(c.awaitUntil(delayedDate(timeoutMillis)));
230              break;
231 +        default:
232 +            throw new AssertionError();
233          }
234      }
235  
# Line 247 | Line 249 | public class AbstractQueuedSynchronizerT
249                  long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis);
250                  long nanosRemaining = c.awaitNanos(nanosTimeout);
251                  assertTrue(nanosRemaining <= 0);
252 +                assertTrue(nanosRemaining > -MILLISECONDS.toNanos(LONG_DELAY_MS));
253                  break;
254              case awaitUntil:
255                  assertFalse(c.awaitUntil(delayedDate(timeoutMillis)));
# Line 1198 | Line 1201 | public class AbstractQueuedSynchronizerT
1201      public void testTryAcquireSharedNanos_Timeout() {
1202          final BooleanLatch l = new BooleanLatch();
1203          final BooleanLatch observedQueued = new BooleanLatch();
1201        final long timeoutMillis = timeoutMillis();
1204          Thread t = newStartedThread(new CheckedRunnable() {
1205              public void realRun() throws InterruptedException {
1206                  assertFalse(l.isSignalled());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines