curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cammckenzie <...@git.apache.org>
Subject [GitHub] curator pull request #197: [CURATOR-367] Delay reconnect on session expired
Date Mon, 30 Jan 2017 01:24:20 GMT
Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/197#discussion_r98367381
  
    --- Diff: curator-client/src/main/java/org/apache/curator/ConnectionState.java ---
    @@ -160,13 +162,33 @@ public void process(WatchedEvent event)
                 }
             }
     
    +        // only wait during tests
    +        assert waitOnExpiredEvent(event.getState());
    +
             for ( Watcher parentWatcher : parentWatchers )
             {
    -
                 OperationTrace trace = new OperationTrace("connection-state-parent-process",
tracer.get(), getSessionId());
                 parentWatcher.process(event);
                 trace.commit();
             }
    +
    +        if (eventTypeNone) handleState(event.getState());
    +    }
    +
    +    // only for testing
    +    private boolean waitOnExpiredEvent(Event.KeeperState currentState)
    --- End diff --
    
    What is the purpose of the boolean return? The method only ever returns true? Is it purely
so you can call it from the assert?


---
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.
---

Mime
View raw message