Skip to content

Commit

Permalink
ZOOKEEPER-4205: Change X509AuthFailureTest to use dynamically assigne…
Browse files Browse the repository at this point in the history
…d free port

…d free port

Author: Amichai Rothman <amichai@apache.org>

Reviewers: Damien Diederen <dd@crosstwine.com>,Andor Molnar <andor@apache.org>,Christopher Tubbs <ctubbsii@apache.org>,Mohammad Arshad <arshad@apache.org>

Closes #1599 from amichair/ZOOKEEPER-4205
  • Loading branch information
Amichai Rothman authored and arshadmohammad committed Mar 17, 2021
1 parent 2e40011 commit c74658d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void setup() throws Exception{
System.setProperty(ZKClientConfig.SECURE_CLIENT, "true");
System.setProperty(clientX509Util.getSslKeystoreLocationProperty(), testDataPath + "/ssl/testKeyStore.jks");
System.setProperty(clientX509Util.getSslKeystorePasswdProperty(), "testpass");
System.setProperty("zookeeper.admin.serverPort", "" + PortAssignment.unique());
}

@AfterEach
Expand All @@ -58,6 +59,7 @@ public void teardown() throws Exception {
System.clearProperty(clientX509Util.getSslKeystorePasswdProperty());
System.clearProperty(clientX509Util.getSslTruststoreLocationProperty());
System.clearProperty(clientX509Util.getSslTruststorePasswdProperty());
System.clearProperty("zookeeper.admin.serverPort");
clientX509Util.close();
}

Expand Down Expand Up @@ -94,4 +96,4 @@ private ZooKeeper createZKClnt(String cxnString) throws Exception {
return zk;
}

}
}

0 comments on commit c74658d

Please sign in to comment.