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

    https://github.com/apache/geode/pull/317#discussion_r92668393
  
    --- Diff: 
geode-core/src/test/java/org/apache/geode/test/dunit/rules/GfshShellConnectionRule.java
 ---
    @@ -85,21 +91,16 @@ public void connect(String... options) throws Exception 
{
         // javax.naming.CommunicationException [Root exception is 
java.rmi.NoSuchObjectException: no
         // such object in table]" Exception.
         // Tried to wait on jmx connector server being ready, but it doesn't 
work.
    -    // Add the retry logic here to try at most 10 times for connection.
    -    CommandResult result = null;
    -    for (int i = 0; i < 50; i++) {
    -      System.out.println("trying to connect, attempt " + i);
    +    Awaitility.await().atMost(2, TimeUnit.MINUTES).pollDelay(2, 
TimeUnit.SECONDS).until(() -> {
           gfsh.executeCommand(connectCommand.toString());
    -      result = (CommandResult) gfsh.getResult();
    -      System.out.println(gfsh.outputString);
    -      if (!gfsh.outputString.contains("no such object in table")) {
    -        break;
    -      }
    -      Thread.currentThread().sleep(2000);
    -    }
    +      return !gfsh.outputString.contains("no such object in table");
    +    });
    +
    +    CommandResult result = (CommandResult) gfsh.getResult();
    --- End diff --
    
    Oh, I mistakenly assumed it would only give the most recent result.  I 
pushed another try :)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to