This is an automated email from the ASF dual-hosted git repository.
jasonhuynh pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 6cfc84a GEODE-5352: testLocalDataContextWithColocation will now wait
for result before shutting down (#2084)
6cfc84a is described below
commit 6cfc84a34ff54d07e80e42a6d2e24d5ab3240ffa
Author: Jason Huynh <[email protected]>
AuthorDate: Mon Jul 2 15:36:35 2018 -0700
GEODE-5352: testLocalDataContextWithColocation will now wait for result
before shutting down (#2084)
---
.../cache/execute/PRFunctionExecutionDUnitTest.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index e14cb26..e7fd6f6 100755
---
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@ -1887,8 +1887,12 @@ public class PRFunctionExecutionDUnitTest extends
CacheTestCase {
private void validateRegionFunctionContextForColocatedRegions(final int
key1, final int key2) {
Region rootRegion = getRootRegion(regionNameTop);
- Function function = new FunctionAdapter() {
- // @Override
+ Function function = new Function() {
+ @Override
+ public boolean hasResult() {
+ return true;
+ }
+
@Override
public void execute(FunctionContext context) {
RegionFunctionContext regionFunctionContext = (RegionFunctionContext)
context;
@@ -1959,6 +1963,7 @@ public class PRFunctionExecutionDUnitTest extends
CacheTestCase {
validateLocalEntrySet(key1, localData.entrySet());
validateLocalKeySet(key1, localData.keySet());
validateLocalValues(key1, localData.values());
+ context.getResultSender().lastResult(true);
}
// @Override
@@ -1968,7 +1973,9 @@ public class PRFunctionExecutionDUnitTest extends
CacheTestCase {
}
};
-
FunctionService.onRegion(rootRegion).withFilter(createKeySet(key1)).execute(function);
+ ResultCollector<Boolean, List<Boolean>> resultCollector =
+
FunctionService.onRegion(rootRegion).withFilter(createKeySet(key1)).execute(function);
+ assertThat(resultCollector.getResult()).hasSize(1).containsExactly(true);
}
private List<Boolean> executeFunction() {