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 [email protected] or file a JIRA ticket
with INFRA.
---