GEODE-2886 : Updated testcase to fail if expected exception is not thrown. This closes #609
Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/83c19160 Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/83c19160 Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/83c19160 Branch: refs/heads/feature/GEODE-1279 Commit: 83c19160d2b9e5f31a9ae6e48c4b5f59a271a300 Parents: 3720151 Author: Amey Barve <[email protected]> Authored: Fri Aug 11 11:07:05 2017 +0530 Committer: Amey Barve <[email protected]> Committed: Thu Aug 17 15:48:36 2017 +0530 ---------------------------------------------------------------------- .../apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/83c19160/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 2c46b4c..de5ad76 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 @@ -21,6 +21,7 @@ import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.verifyQuery import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.HashMap; @@ -346,6 +347,8 @@ public class LuceneQueriesIntegrationTest extends LuceneIntegrationTest { try { result = luceneService.waitUntilFlushed(nonCreatedIndex, REGION_NAME, 60000, TimeUnit.MILLISECONDS); + fail( + "Should have got the exception because the queue does not exist for the non created index "); } catch (Exception ex) { assertEquals(ex.getMessage(), "java.lang.IllegalStateException: The AEQ does not exist for the index index2 region /index");
