You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by jhuynh1 <gi...@git.apache.org> on 2017/07/20 17:53:32 UTC

[GitHub] geode pull request #609: GEODE-2886 : sent IllegalStateException instead of ...

Github user jhuynh1 commented on a diff in the pull request:

    https://github.com/apache/geode/pull/609#discussion_r128586252
  
    --- Diff: geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java ---
    @@ -290,6 +295,24 @@ public void queryJsonObject() throws Exception {
       }
     
       @Test()
    +  public void testWaitUntilFlushedForException() throws Exception {
    +    Map<String, Analyzer> fields = new HashMap<String, Analyzer>();
    +    fields.put("name", null);
    +    fields.put("lastName", null);
    +    fields.put("address", null);
    +    luceneService.createIndexFactory().setFields(fields).create(INDEX_NAME, REGION_NAME);
    +    Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(REGION_NAME);
    +    final LuceneIndex index = luceneService.getIndex(INDEX_NAME, REGION_NAME);
    +
    +    // This is to send IllegalStateException from WaitUntilFlushedFunction
    +    String nonCreatedIndex = "index2";
    +
    +    boolean b =
    +        luceneService.waitUntilFlushed(nonCreatedIndex, REGION_NAME, 60000, TimeUnit.MILLISECONDS);
    +    assertFalse(b);
    --- End diff --
    
    We should check to make sure the exception is thrown instead of wait for flush returning false.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---