[jira] [Created] (IGNITE-7401) Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IGNITE-7401) Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario

JIRA jira@apache.org
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)