[ https://issues.apache.org/jira/browse/GEODE-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16448765#comment-16448765 ]
Kirk Lund commented on GEODE-5040: ---------------------------------- The problem involves the asynchronous DESTROY of the Region by thread-1 while thread-2 gets a reference to the Region and then tries to assertThat it is null. thread-2 gets a reference to the Region, thread-1 then destroys the Region but hasn't removed it from the region map in Cache yet. thread-2 then executes assertThat(region).isNull(). The Region isn't null (because of the race) so AssertJ starts building up the failure message. Since the Region is a Map, AssertJ invokes size() as part of the failure message and this then throws RegionDestroyedException. The fix requires 1) awaiting the asynchronous change (DESTROY Region) and 2) refetch Region from Cache and assert that it's either null or destroyed. > CI Failure: RegionExpirationDistributedTest.regionExpiresAfterTtl > ----------------------------------------------------------------- > > Key: GEODE-5040 > URL: https://issues.apache.org/jira/browse/GEODE-5040 > Project: Geode > Issue Type: Bug > Components: expiration, tests > Affects Versions: 1.6.0 > Reporter: Anilkumar Gingade > Assignee: Kirk Lund > Priority: Major > > {noformat} > org.apache.geode.cache.RegionExpirationDistributedTest > > regionExpiresAfterTtl(DESTROY) FAILED > org.apache.geode.test.dunit.RMIException: While invoking > org.apache.geode.cache.RegionExpirationDistributedTest$$Lambda$63/1961035464.run > in VM 1 running on Host 6bb748d43f1f with 4 VMs > at org.apache.geode.test.dunit.VM.invoke(VM.java:436) > at org.apache.geode.test.dunit.VM.invoke(VM.java:405) > at org.apache.geode.test.dunit.VM.invoke(VM.java:348) > at > org.apache.geode.cache.RegionExpirationDistributedTest.regionExpiresAfterTtl(RegionExpirationDistributedTest.java:127) > Caused by: > org.apache.geode.cache.RegionDestroyedException: > org.apache.geode.internal.cache.DistributedRegion[path='/RegionExpirationDistributedTest_regionExpiresAfterTtl';scope=DISTRIBUTED_ACK';dataPolicy=REPLICATE; > concurrencyChecksEnabled] > at > org.apache.geode.internal.cache.LocalRegion.checkRegionDestroyed(LocalRegion.java:7391) > at > org.apache.geode.internal.cache.LocalRegion.checkReadiness(LocalRegion.java:2723) > at > org.apache.geode.internal.cache.LocalRegion.size(LocalRegion.java:8834) > at java.util.TreeMap.putAll(TreeMap.java:313) > at java.util.TreeMap.<init>(TreeMap.java:185) > at > org.assertj.core.presentation.StandardRepresentation.toSortedMapIfPossible(StandardRepresentation.java:304) > at > org.assertj.core.presentation.StandardRepresentation.toStringOf(StandardRepresentation.java:284) > at > org.assertj.core.presentation.StandardRepresentation.toStringOf(StandardRepresentation.java:167) > at > org.assertj.core.error.ShouldBeEqual.actualAndExpectedHaveSameStringRepresentation(ShouldBeEqual.java:131) > at > org.assertj.core.error.ShouldBeEqual.newAssertionError(ShouldBeEqual.java:109) > at org.assertj.core.internal.Failures.failure(Failures.java:96) > at org.assertj.core.internal.Objects.assertNull(Objects.java:360) > at > org.assertj.core.api.AbstractAssert.isNull(AbstractAssert.java:274) > at > org.apache.geode.cache.RegionExpirationDistributedTest$Verification.assertRegionStateInRemoteMember(RegionExpirationDistributedTest.java:184) > at > org.apache.geode.cache.RegionExpirationDistributedTest.lambda$regionExpiresAfterTtl$7f930bcf$3(RegionExpirationDistributedTest.java:128) > {noformat} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)