This is an automated email from the ASF dual-hosted git repository.
andor pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new c47b240 ZOOKEEPER-3276: Make
X509UtilTest.testCreateSSLServerSocketWithPort less flaky
c47b240 is described below
commit c47b240809d9c4d09779072bce970e493bea3bc0
Author: Ilya Maykov <[email protected]>
AuthorDate: Tue Feb 12 15:31:55 2019 +0100
ZOOKEEPER-3276: Make X509UtilTest.testCreateSSLServerSocketWithPort less
flaky
Pick the free port right before using it, so there is less time for another
thread/process to grab it from under us.
Author: Ilya Maykov <[email protected]>
Reviewers: [email protected]
Closes #816 from ivmaykov/ZOOKEEPER-3276
(cherry picked from commit bc5083f85a72837d9cf5b32b82eecc6d0c06a35c)
Signed-off-by: Andor Molnar <[email protected]>
---
.../src/test/java/org/apache/zookeeper/common/X509UtilTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/zookeeper-server/src/test/java/org/apache/zookeeper/common/X509UtilTest.java
b/zookeeper-server/src/test/java/org/apache/zookeeper/common/X509UtilTest.java
index 2a6bb32..0a09795 100644
---
a/zookeeper-server/src/test/java/org/apache/zookeeper/common/X509UtilTest.java
+++
b/zookeeper-server/src/test/java/org/apache/zookeeper/common/X509UtilTest.java
@@ -190,8 +190,8 @@ public class X509UtilTest extends
BaseX509ParameterizedTestCase {
@Test(timeout = 5000)
public void testCreateSSLServerSocketWithPort() throws Exception {
- int port = PortAssignment.unique();
setCustomCipherSuites();
+ int port = PortAssignment.unique();
SSLServerSocket sslServerSocket = x509Util.createSSLServerSocket(port);
Assert.assertEquals(sslServerSocket.getLocalPort(), port);
Assert.assertArrayEquals(customCipherSuites,
sslServerSocket.getEnabledCipherSuites());