[cvs] / jsr166 / src / test / tck / AbstractQueuedSynchronizerTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.52, Fri Jul 3 05:48:30 2015 UTC revision 1.53, Sun Jan 1 20:34:39 2017 UTC
# Line 238  Line 238 
238       * default timeout duration).       * default timeout duration).
239       */       */
240      void assertAwaitTimesOut(ConditionObject c, AwaitMethod awaitMethod) {      void assertAwaitTimesOut(ConditionObject c, AwaitMethod awaitMethod) {
241          long timeoutMillis = timeoutMillis();          final long timeoutMillis = timeoutMillis();
242          long startTime;          final long startTime;
243          try {          try {
244              switch (awaitMethod) {              switch (awaitMethod) {
245              case awaitTimed:              case awaitTimed:
# Line 258  Line 258 
258              case awaitUntil:              case awaitUntil:
259                  // We shouldn't assume that nanoTime and currentTimeMillis                  // We shouldn't assume that nanoTime and currentTimeMillis
260                  // use the same time source, so don't use nanoTime here.                  // use the same time source, so don't use nanoTime here.
261                  java.util.Date delayedDate = delayedDate(timeoutMillis());                  java.util.Date delayedDate = delayedDate(timeoutMillis);
262                  assertFalse(c.awaitUntil(delayedDate(timeoutMillis)));                  assertFalse(c.awaitUntil(delayedDate(timeoutMillis)));
263                  assertTrue(new java.util.Date().getTime() >= delayedDate.getTime());                  assertTrue(new java.util.Date().getTime() >= delayedDate.getTime());
264                  break;                  break;

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8