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

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


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

commit 785d7fec6fffae4a68675c2cc9d2af9b07c57627
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 dc3394d..5af4f10 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());
     }
 
     @AfterEach
@@ -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