[
https://issues.apache.org/jira/browse/GEODE-3190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222721#comment-16222721
]
ASF GitHub Bot commented on GEODE-3190:
---------------------------------------
agingade commented on a change in pull request #984: GEODE-3190: Fix a race by
checking if region is destroyed
URL: https://github.com/apache/geode/pull/984#discussion_r147469797
##########
File path:
geode-core/src/test/java/org/apache/geode/internal/cache/DestroyEntryWithConcurrentOperationJUnitTest.java
##########
@@ -131,15 +131,24 @@ protected GemFireCacheImpl createCache() {
return result;
}
+ @Test
+ public void testEntryDestroyWithCacheClose() throws Exception {
+ testEntryDestroyWithCacheClose(false);
+ }
+
+ @Test
+ public void testOffHeapRegionEntryDestroyWithCacheClose() throws Exception {
+ testEntryDestroyWithCacheClose(true);
+ }
+
/**
- * Simulates the conditions for 48182 by setting a test hook boolean in
{@link AbstractRegionMap}.
- * This test hook forces a cache close during a destroy in an off-heap
region. This test asserts
- * that a CacheClosedException is thrown rather than an
EntryNotFoundException (or any other
- * exception type for that matter).
+ * Simulates the conditions setting a test hook boolean in {@link
AbstractRegionMap}. This test
+ * hook forces a cache close during a destroy in a region. This test asserts
that a
+ * CacheClosedException is thrown rather than an EntryNotFoundException (or
any other exception
+ * type for that matter).
*/
- @Test
- public void test48182WithCacheClose() throws Exception {
- AbstractRegionMap.testHookRunnableFor48182 = new Runnable() {
+ private void testEntryDestroyWithCacheClose(boolean isOffHeap) {
Review comment:
If its not a test method; it will be nice to remove test from the name...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> CI failure:
> org.apache.geode.internal.cache.Bug48182JUnitTest.test48182WithRegionDestroy
> ----------------------------------------------------------------------------------------
>
> Key: GEODE-3190
> URL: https://issues.apache.org/jira/browse/GEODE-3190
> Project: Geode
> Issue Type: Bug
> Components: offheap
> Reporter: Lynn Gallinat
> Labels: storage_3
>
> {noformat}
> org.apache.geode.internal.cache.Bug48182JUnitTest >
> test48182WithRegionDestroy FAILED
> java.lang.AssertionError: A RegionDestroyedException was not triggered
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at
> org.apache.geode.internal.cache.Bug48182JUnitTest.test48182WithRegionDestroy(Bug48182JUnitTest.java:201)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)