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

ISPN-3085 ExpiryTest intermittent failure #1812

Closed
wants to merge 1 commit into from

Conversation

mmarkus
Copy link
Contributor

@mmarkus mmarkus commented May 9, 2013

assert cache.get("k1").equals("v");
assert cache.get("k2").equals("v");
assert "v".equals(cache.get("k1")) || moreThanLifespanElapsed(start, idleTime);
assert "v".equals(cache.get("k2")) || moreThanLifespanElapsed(start, idleTime);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather you used assertEquals, something like this: if (!moreThanLifespanElapsed(...)) assertEquals(cache.get(...), "v"))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's possible that between the condition and the assert the time to elapse, so that's not correct ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then v = cache.get(); if(...) assertEquals(v, "v").

Or you could leave it like it is now ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the later

@danberindei
Copy link
Member

Thanks Mircea, integrated!

@danberindei danberindei closed this May 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants