[ 
https://issues.apache.org/jira/browse/GEODE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14951334#comment-14951334
 ] 

Darrel Schneider commented on GEODE-391:
----------------------------------------

I think this was caused by the recent changes to TXExpiryJUnitTest (see 
GEODE-362 and GEODE-385).
In this case the test was doing a region invalidate. The test saw that 
afterExpire on the ExpirationTaskListener happened but then found that 
CacheListener afterRegionInvalidate had not been called and failed with an 
assertion.

I think this is just a test issue. I thought that if the ExpiryTask had run 
(i.e. afterExpire called) that we would have done the expire action. But all it 
means is that the ExpiryTask was run. It may have detected something that 
caused it not to expire. In that case it reschedules which creates a new 
ExpiryTask and that is the one the test now needs to wait on. The most likely 
reason why the ExpiryTask ran but decided it could not do the expire yet is 
this check in the ExpiryTask code:
{code}
  protected boolean isExpirationPossible() throws EntryNotFoundException {
    long expTime = getExpirationTime();
    if (expTime > 0L && getNow() >= expTime) {
{code}
If the scheduler just wakes up 1ms early or if the clock that getNow uses has 
not "ticked" then getNow() can be less than expTIme and the test will be 
rescheduled.



> CI failure: DistTXExpiryJUnitTest.testRegionTTLExpiration
> ---------------------------------------------------------
>
>                 Key: GEODE-391
>                 URL: https://issues.apache.org/jira/browse/GEODE-391
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Bruce Schuchardt
>            Assignee: Darrel Schneider
>
>  com.gemstone.gemfire.disttx.DistTXExpiryJUnitTest.testRegionTTLExpiration 
> (Failed 1 times in the last 22 runs. Stability: 95 %)
> java.lang.AssertionError: expected:<true> but was:<false>
>     at org.junit.Assert.fail(Assert.java:88)
>     at org.junit.Assert.failNotEquals(Assert.java:834)
>     at org.junit.Assert.assertEquals(Assert.java:118)
>     at org.junit.Assert.assertEquals(Assert.java:144)
>     at 
> com.gemstone.gemfire.TXExpiryJUnitTest.generalRegionExpirationTest(TXExpiryJUnitTest.java:352)
>     at 
> com.gemstone.gemfire.TXExpiryJUnitTest.testRegionTTLExpiration(TXExpiryJUnitTest.java:291)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to