bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [bookkeeper] branch master updated: ISSUE #462: TestTLS failures
Date Mon, 28 Aug 2017 09:01:01 GMT
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e6556f  ISSUE #462: TestTLS failures
6e6556f is described below

commit 6e6556f29ecbf966404423b7d67897e5dcba712a
Author: Sijie Guo <sijie@apache.org>
AuthorDate: Mon Aug 28 02:00:53 2017 -0700

    ISSUE #462: TestTLS failures
    
    Descriptions of the changes in this PR:
    
    Problem:
    
    The behavior of loading configuration in `AbstractConfiguration` was changed recently.
    So the TLS provider was not cleared correctly for the failed tests.
    
    Solution:
    
    Explicitly clear TLS provider for each configuratio to address the failed tests.
    
    Author: Sijie Guo <sijie@apache.org>
    
    Reviewers: Enrico Olivelli <eolivelli@gmail.com>
    
    This closes #478 from sijie/fix_tls_test, closes #462
---
 .../src/test/java/org/apache/bookkeeper/tls/TestTLS.java     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
index 61e78b5..2f56a9d 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/tls/TestTLS.java
@@ -237,8 +237,10 @@ public class TestTLS extends BookKeeperClusterTestCase {
      */
     @Test(timeout = 60000)
     public void testClientWantsTLSNoServersHaveIt() throws Exception {
-        ServerConfiguration serverConf = new ServerConfiguration(baseConf);
-        serverConf.setTLSProviderFactoryClass(null);
+        ServerConfiguration serverConf = new ServerConfiguration();
+        for (ServerConfiguration conf : bsConfs) {
+            conf.setTLSProviderFactoryClass(null);
+        }
         restartBookies(serverConf);
 
         ClientConfiguration clientConf = new ClientConfiguration(baseClientConf);
@@ -257,8 +259,10 @@ public class TestTLS extends BookKeeperClusterTestCase {
     @Test(timeout = 60000)
     public void testTLSClientButOnlyFewTLSServers() throws Exception {
         // disable TLS on initial set of bookies
-        ServerConfiguration serverConf = new ServerConfiguration(baseConf);
-        serverConf.setTLSProviderFactoryClass(null);
+        ServerConfiguration serverConf = new ServerConfiguration();
+        for (ServerConfiguration conf : bsConfs) {
+            conf.setTLSProviderFactoryClass(null);
+        }
         restartBookies(serverConf);
 
         // add two bookies which support TLS

-- 
To stop receiving notification emails like this one, please contact
['"commits@bookkeeper.apache.org" <commits@bookkeeper.apache.org>'].

Mime
View raw message