[ 
https://issues.apache.org/jira/browse/GEODE-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15254783#comment-15254783
 ] 

ASF GitHub Bot commented on GEODE-1288:
---------------------------------------

Github user pdxrunner commented on the pull request:

    https://github.com/apache/incubator-geode/pull/136#issuecomment-213604710
  
    There's a mismatch in the fail() message and the loop logic. The full wait 
time is 10,000 millis, but the message (and preceding comments) say it's for 
1,000 millis.
    
          long giveup = System.currentTimeMillis() + 10000;
          boolean done = false;
          do {
            Thread.sleep(10);
            done = r.containsValueForKey("key");
          } while (!done && System.currentTimeMillis() < giveup);
    
          if (r.containsValueForKey("key")) {
            fail("1 ms expire did not happen after waiting 1000 ms");
          }
        } finally {
          System.getProperties().remove(LocalRegion.EXPIRY_MS_PROPERTY);
     


> Bug44418JUnitTest logic error causes unnecessary wait duration
> --------------------------------------------------------------
>
>                 Key: GEODE-1288
>                 URL: https://issues.apache.org/jira/browse/GEODE-1288
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Scott Jewell
>            Assignee: Scott Jewell
>
> Test waits for entry to expire or a specific amount of time.
> Logic error causes wait to always be for full amount of time
> even though the entry has expired.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to