Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13161

ClusterExpirationMaxIdleTest.testMaxIdleAccessSuspectedExpiredEntryRefreshesProperly

    XMLWordPrintable

    Details

      Description

      The test assumes that the node that initiates the get operation, either the primary or a backup owner, is also the one to initiate the async touch command, so the last access timestamp is always updated synchronously on the reader.
      This is true in distributed caches, but in a scattered cache with ASYNC touch, the reader's last access timestamp may be updated asynchronously.

      If the reader is a backup owner, it sends a ClusteredGetCommand to the primary owner in order to fetch the latest value, and the primary owner sends the touch command to all the nodes (without waiting for replies, if touch mode is ASYNC).

      15:10:57,347 TRACE (testng-Test:[]) [InvocationContextInterceptor] Invoked with command GetKeyValueCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=null, lockOwner=null}]
      15:10:57,348 TRACE (testng-Test:[]) [JGroupsTransport] Test-NodeB sending single request 13 to Test-NodeA: ClusteredGetCommand{key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[], topologyId=5, isWrite=false}
      15:10:57,349 TRACE (jgroups-8,Test-NodeA:[]) [InvocationContextInterceptor] Invoked with command GetCacheEntryCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[SKIP_REMOTE_LOOKUP]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=Test-NodeB, lockOwner=null}]
      15:10:57,349 TRACE (jgroups-8,Test-NodeA:[]) [InvocationContextInterceptor] Invoked with command TouchCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=null, lockOwner=null}]
      15:10:57,349 TRACE (jgroups-8,Test-NodeA:[]) [JGroupsTransport] Test-NodeA sending command to all: SingleRpcCommand{cacheName='defaultcache', command=TouchCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[]}}
      15:10:57,350 TRACE (jgroups-7,Test-NodeC:[]) [InvocationContextInterceptor] Invoked with command TouchCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=Test-NodeA, lockOwner=null}]
      15:10:57,350 TRACE (jgroups-6,Test-NodeB:[]) [InvocationContextInterceptor] Invoked with command TouchCommand {key=MagicKey{A4E/B64863EF/0@Test-NodeA}, flags=[]} and InvocationContext [SingleKeyNonTxInvocationContext{isLocked=false, key=null, cacheEntry=null, origin=Test-NodeA, lockOwner=null}]
      
      15:10:57,351 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.testMaxIdleAccessSuspectedExpiredEntryRefreshesProperly[SCATTERED_SYNC, tx=false, OBJECT, touch=ASYNC]
      java.lang.AssertionError: expected:<1005000> but was:<1000000>
      	at org.testng.AssertJUnit.fail(AssertJUnit.java:59) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:170) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:177) ~[testng-6.14.3.jar:?]
      	at org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.assertLastUsedUpdate(ClusterExpirationMaxIdleTest.java:331) ~[test-classes/:?]
      	at org.infinispan.expiration.impl.ClusterExpirationMaxIdleTest.testMaxIdleAccessSuspectedExpiredEntryRefreshesProperly(ClusterExpirationMaxIdleTest.java:313) ~[test-classes/:?]
      

        Attachments

          Activity

            People

            Assignee:
            dan.berindei Dan Berindei
            Reporter:
            dan.berindei Dan Berindei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: