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

Comparing jsr166/src/test/tck/SemaphoreTest.java (file contents):
Revision 1.21 by jsr166, Sat Nov 21 17:38:05 2009 UTC vs.
Revision 1.23 by jsr166, Tue Dec 1 06:28:44 2009 UTC

# Line 212 | Line 212 | public class SemaphoreTest extends JSR16
212          Thread t = new Thread(new CheckedRunnable() {
213              public void realRun() throws InterruptedException {
214                  s.release();
215 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
215 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
216                  s.release();
217 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
217 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
218              }});
219  
220          t.start();
# Line 594 | Line 594 | public class SemaphoreTest extends JSR16
594          final Semaphore s = new Semaphore(1, true);
595          Thread t = new Thread(new CheckedRunnable() {
596              public void realRun() throws InterruptedException {
597 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
598 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
599 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
600 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
601 <                threadAssertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
597 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
598 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
599 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
600 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
601 >                assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS));
602              }});
603  
604          t.start();
# Line 618 | Line 618 | public class SemaphoreTest extends JSR16
618          final Semaphore s = new Semaphore(2, true);
619          Thread t = new Thread(new CheckedRunnable() {
620              public void realRun() throws InterruptedException {
621 <                threadAssertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS));
621 >                assertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS));
622                  s.release(2);
623 <                threadAssertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS));
623 >                assertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS));
624                  s.release(2);
625              }});
626  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines