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

Wrong calculation of expiration time after update with no TTL #8113

Closed
ahmetmircik opened this issue May 6, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@ahmetmircik
Copy link
Member

commented May 6, 2016

Expected behaviour is expiration-time = last-update-time + ttl

This test shoes the issue.

@Test
    public void testExpirationTime_calculated_against_lastUpdateTime_after_PutWithNoTTL() throws Exception {
        IMap<Integer, Integer> map = createMap();

        map.put(1, 1, 1, MINUTES);
        sleepMillis(1);
        map.put(1, 1);

        EntryView<Integer, Integer> entryView = map.getEntryView(1);
        long expectedExpirationTime = entryView.getLastUpdateTime() + MINUTES.toMillis(1);

        assertEquals(expectedExpirationTime, entryView.getExpirationTime());
    }
@ahmetmircik

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

already fixed here : #8111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.