Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-1288: Correct entry expiration detection logic error #136

Closed
wants to merge 3 commits into from
Closed

GEODE-1288: Correct entry expiration detection logic error #136

wants to merge 3 commits into from

Conversation

gemzdude
Copy link
Contributor

Corrected while loop logic error

@pdxrunner
Copy link

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);

@dschneider-pivotal
Copy link
Contributor

This looks good. I will pull it in.

@asfgit asfgit closed this in 1a50b76 May 4, 2016
asfgit pushed a commit that referenced this pull request May 17, 2016
robbadler pushed a commit to smgoller/geode that referenced this pull request Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants