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

ASF subversion and git services commented on GEODE-361:
-------------------------------------------------------

Commit 5cf63899ca5270d736339e1ad1192751a97cf66c in incubator-geode's branch 
refs/heads/feature/GEODE-409 from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=5cf6389 ]

GEODE-361: fix expiry races in unit test

The test now uses WaitCriterion when waiting
for an expiration. Also it now configures
millisecond expiry so the test runs faster.


> RegionReliabilityDistNoAckDUnitTest.testFullAccessWithLocalRegionExpiration 
> intermittently fails
> ------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-361
>                 URL: https://issues.apache.org/jira/browse/GEODE-361
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Minor
>              Labels: CI
>
> {code}
> junit.framework.AssertionFailedError
>       at junit.framework.Assert.fail(Assert.java:55)
>       at junit.framework.Assert.assertTrue(Assert.java:22)
>       at junit.framework.Assert.assertTrue(Assert.java:31)
>       at junit.framework.TestCase.assertTrue(TestCase.java:201)
>       at 
> com.gemstone.gemfire.cache30.RegionReliabilityTestCase.testFullAccessWithLocalRegionExpiration(RegionReliabilityTestCase.java:1003)
> {code}
> The test is scheduling a region to expire after 1 second. it then sleeps for 
> 2 and asserts that it has to have expired.
> The test needs to be changed to use a wait criteria. It would also be good to 
> change to test to use a millisecond based expiration clock instead second 
> based so the test does not waste time sleeping.
> {code}
>     AttributesMutator mutator = region.getAttributesMutator();
>     mutator.setRegionTimeToLive(
>       new ExpirationAttributes(1, ExpirationAction.LOCAL_DESTROY));
>       
>     // sleep and make sure region does expire
>     sleep(2000);
>     assertTrue(region.isDestroyed());
>  {code}



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

Reply via email to