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

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

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

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

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8