You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2017/08/21 21:08:44 UTC
[27/51] [abbrv] geode git commit: GEODE-2886 : 1. updated to throw
IllegalStateException from WaitUntilFlushedFunction.java and corresponding
testcase change.
GEODE-2886 : 1. updated to throw IllegalStateException from
WaitUntilFlushedFunction.java and corresponding testcase change.
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/37201519
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/37201519
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/37201519
Branch: refs/heads/feature/GEODE-3416
Commit: 37201519de5968ba265e133a92ececf0c3892bb0
Parents: a1c3fc7
Author: Amey Barve <ab...@apache.org>
Authored: Tue Aug 8 18:41:22 2017 +0530
Committer: Amey Barve <ab...@apache.org>
Committed: Thu Aug 17 15:47:30 2017 +0530
----------------------------------------------------------------------
.../internal/distributed/WaitUntilFlushedFunction.java | 4 +---
.../cache/lucene/LuceneQueriesIntegrationTest.java | 13 +++++++++----
2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/37201519/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
index ca77873..6c0b8b7 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
@@ -61,10 +61,8 @@ public class WaitUntilFlushedFunction implements Function, InternalEntity {
}
} else {
- IllegalStateException illegalStateException = new IllegalStateException(
+ throw new IllegalStateException(
"The AEQ does not exist for the index " + indexName + " region " + region.getFullPath());
- logger.error(illegalStateException.getMessage());
- resultSender.lastResult(result);
}
resultSender.lastResult(result);
}
http://git-wip-us.apache.org/repos/asf/geode/blob/37201519/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java
index 2044c68..2c46b4c 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java
@@ -342,10 +342,15 @@ public class LuceneQueriesIntegrationTest extends LuceneIntegrationTest {
// This is to send IllegalStateException from WaitUntilFlushedFunction
String nonCreatedIndex = "index2";
-
- boolean b =
- luceneService.waitUntilFlushed(nonCreatedIndex, REGION_NAME, 60000, TimeUnit.MILLISECONDS);
- assertFalse(b);
+ boolean result = false;
+ try {
+ result = luceneService.waitUntilFlushed(nonCreatedIndex, REGION_NAME, 60000,
+ TimeUnit.MILLISECONDS);
+ } catch (Exception ex) {
+ assertEquals(ex.getMessage(),
+ "java.lang.IllegalStateException: The AEQ does not exist for the index index2 region /index");
+ assertFalse(result);
+ }
}
@Test()