Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZOOKEEPER-3655] Remove localhost hardcoding from QuorumSSLTest on master #1272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kishorvpatil
Copy link

As requested on #1188, creating corresponding PR for master.

Copy link
Contributor

@symat symat left a comment

Choose a reason for hiding this comment

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

Thanks for submitting the PR!
In general I liked your change, I added some comments.

private static String HOSTNAME;
private static String ipAddress;

{
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a benefit using a static variable plus this initializer block? I would maybe prefer simply setting non-static ipAddress ad hostname in the setup() method we have already below. I think the later would be a bit nicer.

If you decide to stick with the static variables, then please use capital letters (e.g. IP_ADDRESS) to match the other static variables.

HOSTNAME = address.getHostName();
ipAddress = address.getHostAddress();
} catch (UnknownHostException e) {
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

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

please use a logger to log exceptions.

@symat
Copy link
Contributor

symat commented Mar 2, 2020

It looks the test class is actually fails now on Jenkins: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build-maven/1883/testReport/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants