You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/07/11 01:53:26 UTC

[pulsar] branch branch-2.7 updated: [branch-2.7][fix][test] Enable ignored tests (#16435)

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

penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new d7b9718f9d9 [branch-2.7][fix][test] Enable ignored tests (#16435)
d7b9718f9d9 is described below

commit d7b9718f9d9809554c1a58aae1db2c81ba92e9c8
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Mon Jul 11 09:53:18 2022 +0800

    [branch-2.7][fix][test] Enable ignored tests (#16435)
---
 .../org/apache/pulsar/client/TlsProducerConsumerTest.java |  6 +++---
 .../src/test/resources/authentication/tls/broker-cert.pem | 15 +++++++--------
 .../apache/pulsar/broker/service/BrokerServiceTest.java   |  5 ++++-
 .../api/AuthenticationTlsHostnameVerificationTest.java    | 10 +++++-----
 .../pulsar/proxy/server/ProxyServiceStarterTest.java      |  2 +-
 5 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/bouncy-castle/bcfips-include-test/src/test/java/org/apache/pulsar/client/TlsProducerConsumerTest.java b/bouncy-castle/bcfips-include-test/src/test/java/org/apache/pulsar/client/TlsProducerConsumerTest.java
index 40ae8bf4a65..f7549f8f0e5 100644
--- a/bouncy-castle/bcfips-include-test/src/test/java/org/apache/pulsar/client/TlsProducerConsumerTest.java
+++ b/bouncy-castle/bcfips-include-test/src/test/java/org/apache/pulsar/client/TlsProducerConsumerTest.java
@@ -38,7 +38,7 @@ public class TlsProducerConsumerTest extends TlsProducerConsumerBase {
      *
      * @throws Exception
      */
-//    @Test(timeOut = 30000)
+    @Test(timeOut = 30000)
     public void testTlsLargeSizeMessage() throws Exception {
         log.info("-- Starting {} test --", methodName);
 
@@ -72,7 +72,7 @@ public class TlsProducerConsumerTest extends TlsProducerConsumerBase {
         log.info("-- Exiting {} test --", methodName);
     }
 
-//    @Test(timeOut = 30000)
+    @Test(timeOut = 30000)
     public void testTlsClientAuthOverBinaryProtocol() throws Exception {
         log.info("-- Starting {} test --", methodName);
 
@@ -102,7 +102,7 @@ public class TlsProducerConsumerTest extends TlsProducerConsumerBase {
         }
     }
 
-//    @Test(timeOut = 30000)
+    @Test(timeOut = 30000)
     public void testTlsClientAuthOverHTTPProtocol() throws Exception {
         log.info("-- Starting {} test --", methodName);
 
diff --git a/bouncy-castle/bcfips-include-test/src/test/resources/authentication/tls/broker-cert.pem b/bouncy-castle/bcfips-include-test/src/test/resources/authentication/tls/broker-cert.pem
index 0aac0e9fec6..f83324c4f0b 100644
--- a/bouncy-castle/bcfips-include-test/src/test/resources/authentication/tls/broker-cert.pem
+++ b/bouncy-castle/bcfips-include-test/src/test/resources/authentication/tls/broker-cert.pem
@@ -3,16 +3,16 @@ Certificate:
         Version: 3 (0x2)
         Serial Number:
             61:e6:1b:07:90:6a:4f:f7:cd:46:b9:59:1d:3e:1c:39:0d:f2:5e:05
-        Signature Algorithm: sha1WithRSAEncryption
-        Issuer: C=US, ST=CA, O=Apache, OU=Pulsar Incubator, CN=localhost
+        Signature Algorithm: sha256WithRSAEncryption
+        Issuer: CN = CARoot
         Validity
             Not Before: May 30 13:38:24 2022 GMT
             Not After : May 27 13:38:24 2032 GMT
-        Subject: C=US, ST=CA, O=Apache, OU=Apache Pulsar, CN=localhost
+        Subject: C = US, ST = CA, O = Apache, OU = Apache Pulsar, CN = localhost
         Subject Public Key Info:
             Public Key Algorithm: rsaEncryption
-            RSA Public Key: (2048 bit)
-                Modulus (2048 bit):
+                RSA Public-Key: (2048 bit)
+                Modulus:
                     00:af:bf:b7:2d:98:ad:9d:f6:da:a3:13:d4:62:0f:
                     98:be:1c:a2:89:22:ba:6f:d5:fd:1f:67:e3:91:03:
                     98:80:81:0e:ed:d8:f6:70:7f:2c:36:68:3d:53:ea:
@@ -33,9 +33,9 @@ Certificate:
                     a7:35
                 Exponent: 65537 (0x10001)
         X509v3 extensions:
-            X509v3 Subject Alternative Name: 
+            X509v3 Subject Alternative Name:
                 DNS:localhost, IP Address:127.0.0.1
-            Netscape Comment: 
+    Signature Algorithm: sha256WithRSAEncryption
          88:1d:a7:42:a1:1c:87:45:4a:e6:5e:aa:9c:7b:71:2e:5c:9e:
          11:85:0f:a3:c5:b4:ea:73:9e:b7:61:9d:4a:e9:cd:1a:c5:2e:
          03:be:a3:2b:b6:12:6a:15:03:04:3f:fb:4a:09:0d:84:0e:dd:
@@ -69,5 +69,4 @@ A8AcDY25brDQXyHB0+NF389kaRNsVHkGfVNGdzwhzMRqX/maBw+llSDwDpMHSJap
 LChQIdf4E0+4yqofpkF8cR+tET89HumBPIbBry05oBOfmeyaR0TfKAKnHWqNwB4k
 6Bn8HdxnKQS+CtbFgVknLPXl37oLxlDls71zEj4s76aK7euGmkVFUqNEeBJgF+I6
 MpIDbomJFsXgvL6ny5NL2FYzoKBTsg2l
-c6U=
 -----END CERTIFICATE-----
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
index f279ae14b5e..83696bece17 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
@@ -827,8 +827,11 @@ public class BrokerServiceTest extends BrokerTestBase {
         }
     }
 
-//    @Test
+    @Test
     public void testTopicLoadingOnDisableNamespaceBundle() throws Exception {
+        conf.setWebServicePort(Optional.of(0));
+        restartBroker();
+
         final String namespace = "prop/disableBundle";
         admin.namespaces().createNamespace(namespace);
         admin.namespaces().setNamespaceReplicationClusters(namespace, Sets.newHashSet("test"));
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
index 911f7549333..d6af356401c 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/AuthenticationTlsHostnameVerificationTest.java
@@ -38,7 +38,7 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-//@Test(groups = "broker-api")
+@Test(groups = "broker-api")
 public class AuthenticationTlsHostnameVerificationTest extends ProducerConsumerBase {
     private static final Logger log = LoggerFactory.getLogger(AuthenticationTlsHostnameVerificationTest.class);
 
@@ -141,8 +141,8 @@ public class AuthenticationTlsHostnameVerificationTest extends ProducerConsumerB
      *
      * @throws Exception
      */
-//    @Test(dataProvider = "hostnameVerification")
-    public void testTlsSyncProducerAndConsumerWithInvalidBrokerHost()
+    @Test(dataProvider = "hostnameVerification")
+    public void testTlsSyncProducerAndConsumerWithInvalidBrokerHost(boolean hostnameVerificationEnabled)
         throws Exception {
         log.info("-- Starting {} test --", methodName);
 
@@ -185,7 +185,7 @@ public class AuthenticationTlsHostnameVerificationTest extends ProducerConsumerB
      *
      * @throws Exception
      */
-//    @Test
+    @Test
     public void testTlsSyncProducerAndConsumerCorrectBrokerHost() throws Exception {
         log.info("-- Starting {} test --", methodName);
 
@@ -229,7 +229,7 @@ public class AuthenticationTlsHostnameVerificationTest extends ProducerConsumerB
      *
      * @throws Exception
      */
-//    @Test
+    @Test
     public void testDefaultHostVerifier() throws Exception {
         log.info("-- Starting {} test --", methodName);
         Method matchIdentityStrict = TlsHostnameVerifier.class.getDeclaredMethod("matchIdentityStrict",
diff --git a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java
index 46f7de61808..65424f2afe7 100644
--- a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java
+++ b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java
@@ -92,7 +92,7 @@ public class ProxyServiceStarterTest extends MockedPulsarServiceBaseTest {
         }
     }
 
-//    @Test
+    @Test
     public void testProduceAndConsumeMessageWithWebsocket() throws Exception {
         HttpClient producerClient = new HttpClient();
         WebSocketClient producerWebSocketClient = new WebSocketClient(producerClient);