You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2020/05/08 16:45:48 UTC
[geode] 01/01: Revert "GEODE-8072: check the null and stop the on-going query function when … (#5053)"
This is an automated email from the ASF dual-hosted git repository.
zhouxj pushed a commit to branch feature/GEODE-8072
in repository https://gitbox.apache.org/repos/asf/geode.git
commit daced1e4883a862ff39a938eb10a05a8ded8fb7c
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Fri May 8 09:36:53 2020 -0700
Revert "GEODE-8072: check the null and stop the on-going query function when … (#5053)"
This reverts commit 536910a62e6a5c0d6f46d2f42f467aa41ed40dc0.
Need to consider a better exception handling
---
.../cache/execute/InternalFunctionExecutionServiceImpl.java | 4 ----
.../cache/execute/InternalFunctionExecutionServiceTest.java | 10 ----------
2 files changed, 14 deletions(-)
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceImpl.java
index 5784803..dc73351 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceImpl.java
@@ -116,10 +116,6 @@ public class InternalFunctionExecutionServiceImpl
throw new FunctionException("Region instance passed is null");
}
- if (region.isDestroyed()) {
- throw new FunctionException("Region is destroyed");
- }
-
ProxyCache proxyCache = null;
String poolName = region.getAttributes().getPoolName();
if (poolName != null) {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceTest.java
index 0f84d31..eec2b6d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceTest.java
@@ -47,16 +47,6 @@ public class InternalFunctionExecutionServiceTest {
}
@Test
- public void onRegionShouldThrowExceptionWhenRegionAttributesIsNull() {
- Region mockRegion = mock(Region.class);
- when(mockRegion.isDestroyed()).thenReturn(true);
-
- assertThatThrownBy(() -> functionExecutionService.onRegion(mockRegion))
- .isInstanceOf(FunctionException.class)
- .hasMessage("Region is destroyed");
- }
-
- @Test
public void onRegionShouldThrowExceptionWhenThePoolAssociatedWithTheRegionCanNotBeFound() {
when(functionExecutionService.findPool(any())).thenReturn(null);