ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-7401) Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario
Date Fri, 12 Jan 2018 16:25:00 GMT
Andrey Gura created IGNITE-7401:
-----------------------------------

             Summary: Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put"
scenario
                 Key: IGNITE-7401
                 URL: https://issues.apache.org/jira/browse/IGNITE-7401
             Project: Ignite
          Issue Type: Bug
            Reporter: Andrey Gura


Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario.
The following test case demonstrate the problem.

{code:java}
    public void testPutWithTtlThenPut() throws Exception {
        Ignite ignite = startGrid();

        try {
            IgniteCache<Object, Object> cache = ignite.cache("cache");

            CreatedExpiryPolicy expiryPlc = new CreatedExpiryPolicy(new Duration(TimeUnit.MILLISECONDS,
10));

            IgniteCache<Object, Object> cacheTtl = cache.withExpiryPolicy(expiryPlc);

            cacheTtl.put("key", "v1");
            cache.put("key", "v2");

            U.sleep(10);

            assertEquals("v2", cache.get("key")); // Fill fail (flaky)
        }
        finally {
            stopAllGrids();
        }
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message