You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by nicktrav <gi...@git.apache.org> on 2017/08/18 17:16:21 UTC

[GitHub] zookeeper issue #330: ZOOKEEPER-2471: ZK Java client should not count sleep ...

Github user nicktrav commented on the issue:

    https://github.com/apache/zookeeper/pull/330
  
    Feels a little awkward to have a non-trivial change without any tests :/
    
    > I'm still going to be stuck depending on the behavior of that randomly-generated sleep time, which is going to be inherently unreliable
    
    Thinking aloud here ... given your second commit updates to use the `Time` utility, could you now inject that class, (or perhaps a faked implementation given the methods are static), into `ClientCnxnSocket` and its subclasses? This would make it more amenable to testing. You'd have more control over the times that are returned.
    
    You'd still need to plumb that through into `ClientCnxn`, but it looks like the constructor takes a `ClientCnxnSocket`, which could work here?
    
    Maybe we can get that scaffolding wired up in another PR, get that merged in, and this change could leverage that?


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