This is an automated email from the ASF dual-hosted git repository.

arshad pushed a commit to branch branch-3.6
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.6 by this push:
     new 545b223  ZOOKEEPER-4205: Change X509AuthFailureTest to use dynamically 
assigned free port
545b223 is described below

commit 545b223bc512eb03106b7b48f79fe1dfdeaa05ba
Author: Amichai Rothman <[email protected]>
AuthorDate: Wed Mar 17 14:02:13 2021 +0530

    ZOOKEEPER-4205: Change X509AuthFailureTest to use dynamically assigned free 
port
    
    …d free port
    
    Author: Amichai Rothman <[email protected]>
    
    Reviewers: Damien Diederen <[email protected]>,Andor Molnar 
<[email protected]>,Christopher Tubbs <[email protected]>,Mohammad Arshad 
<[email protected]>
    
    Closes #1599 from amichair/ZOOKEEPER-4205
    
    (cherry picked from commit c74658d398cdc1d207aa296cb6e20de00faec03e)
    Signed-off-by: Mohammad Arshad <[email protected]>
---
 .../test/java/org/apache/zookeeper/server/X509AuthFailureTest.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/zookeeper-server/src/test/java/org/apache/zookeeper/server/X509AuthFailureTest.java
 
b/zookeeper-server/src/test/java/org/apache/zookeeper/server/X509AuthFailureTest.java
index 7f22d3a..18147bb 100644
--- 
a/zookeeper-server/src/test/java/org/apache/zookeeper/server/X509AuthFailureTest.java
+++ 
b/zookeeper-server/src/test/java/org/apache/zookeeper/server/X509AuthFailureTest.java
@@ -47,6 +47,7 @@ public class X509AuthFailureTest extends ZKTestCase {
         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());
     }
 
     @After
@@ -58,6 +59,7 @@ public class X509AuthFailureTest extends ZKTestCase {
         System.clearProperty(clientX509Util.getSslKeystorePasswdProperty());
         
System.clearProperty(clientX509Util.getSslTruststoreLocationProperty());
         System.clearProperty(clientX509Util.getSslTruststorePasswdProperty());
+        System.clearProperty("zookeeper.admin.serverPort");
         clientX509Util.close();
     }
 
@@ -94,4 +96,4 @@ public class X509AuthFailureTest extends ZKTestCase {
         return zk;
     }
 
-}
\ No newline at end of file
+}

Reply via email to