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

Darrel Schneider commented on GEODE-362:
----------------------------------------

This looks like a unit test issue. The test basically does this:
    exprReg.put("key0", "value");
    Thread.sleep(500);
    this.txMgr.begin();
    exprReg.put("key0", "value");
    waitDance(wasDestroyed, waitMs);

The expiration is 1000 milliseconds so it expects sleeping for 500 to not be a 
problem. But once in a blue moon sleeping for 500 can cause us to over sleep 
and let the expiration happen before we can do the second put. So in this case 
waitDance fails with the assertion we see because the expiration cause 
afterDestroy of "key0" to be called in the test's cache listener.

Other unit tests use some test hooks to explicitly disable expiration from 
occurring. This test needs to be modified to do that and should also be 
modified to use millisecond resolution expiration so that the test does not 
need to wait so long.


> TXExpiryJUnitTest.testEntryIdleExpiration intermittently fails because Cache 
> listener detected a destroy
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-362
>                 URL: https://issues.apache.org/jira/browse/GEODE-362
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Minor
>              Labels: CI
>
> This was seen on a private build of git rev 
> 4708d4e182f89c6a391fcad8bac854f929717685:
> {code}
> java.lang.AssertionError: Cache listener detected a destroy oh man that is 
> bad!
>       at org.junit.Assert.fail(Assert.java:88)
>       at 
> com.gemstone.gemfire.TXExpiryJUnitTest.waitDance(TXExpiryJUnitTest.java:122)
>       at 
> com.gemstone.gemfire.TXExpiryJUnitTest.generalEntryExpirationTest(TXExpiryJUnitTest.java:186)
>       at 
> com.gemstone.gemfire.TXExpiryJUnitTest.testEntryIdleExpiration(TXExpiryJUnitTest.java:106)
> {code}



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

Reply via email to