You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zh...@apache.org on 2019/06/03 02:13:03 UTC

[pulsar] branch master updated: Use unique name for PeerReplicatorTest (#4440)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2b70daf  Use unique name for PeerReplicatorTest (#4440)
2b70daf is described below

commit 2b70dafb9784baa9fc11f5bcb99898b1ed1483bb
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Sun Jun 2 19:12:57 2019 -0700

    Use unique name for PeerReplicatorTest (#4440)
    
    Motivation
    The PeerReplicatorTest.testPeerClusterInReplicationClusterListChange test sometime fails with :
    expected [false] but found [true]
    The retry then fails because the namespace already exists. Using a unique name will give the retry a clean state.
---
 .../java/org/apache/pulsar/broker/service/PeerReplicatorTest.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
index c0e597e..1581bb9 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PeerReplicatorTest.java
@@ -185,7 +185,7 @@ public class PeerReplicatorTest extends ReplicatorTestBase {
      *
      * @throws Exception
      */
-    @Test(timeOut = 10000)
+    @Test
     public void testPeerClusterInReplicationClusterListChange() throws Exception {
 
         // clean up peer-clusters
@@ -194,7 +194,7 @@ public class PeerReplicatorTest extends ReplicatorTestBase {
         admin1.clusters().updatePeerClusterNames("r3", null);
 
         final String serviceUrl = pulsar3.getBrokerServiceUrl();
-        final String namespace1 = "pulsar/global/peer-change-repl-ns";
+        final String namespace1 = "pulsar/global/peer-change-repl-ns-" + System.nanoTime();
         admin1.namespaces().createNamespace(namespace1);
         // add replication cluster
         admin1.namespaces().setNamespaceReplicationClusters(namespace1, Sets.newHashSet("r1"));