Skip to content

Conversation

@maoling
Copy link
Member

@maoling maoling commented Oct 10, 2018

more details in ZOOKEEPER-3158

@asfgit
Copy link

asfgit commented Oct 10, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2409/

@eolivelli
Copy link
Contributor

Good.
What about adding a test case to demonstrate the problem and prevent regressions in the future?

Copy link
Contributor

@lvfangmin lvfangmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it’s better to have a test case to cover this.

needSasl.set(false);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove tailing white space.

@maoling
Copy link
Member Author

maoling commented Oct 14, 2018

@eolivelli @lvfangmin
it was a issue found by p3c which is like findbug.
it's not very easy to add a UT and easy to check the correctness,WDYT?

@eolivelli
Copy link
Contributor

@maoling Actually wakeupCnxn cannot really throw exceptions (I did not check the code when I reviewed the diff), so I think the adding a test is very difficult and so a big deal.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 (non binding)

@dineshappavoo
Copy link

dineshappavoo commented Oct 16, 2018

This change LGTM 👍 . One followup, I am not familiar with the code flow, Just checking is it not possible to throw an exception in sendThread.primeConnection() in the try block(Some mock objects or so)

…ndThread.primeConnection() has thrown an exception
@maoling
Copy link
Member Author

maoling commented Oct 24, 2018

@eolivelli @dineshappavoo
you're right. I was mislead by void primeConnection() throws IOException which don't throw an IOException.
But,Follow the paradigm,put the firstConnect.countDown() into finally block is better?

@asfgit
Copy link

asfgit commented Oct 24, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2488/

@maoling maoling closed this Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants