sijie closed pull request #1909: Use consistent naming for cluster envvar in 
integ test
URL: https://github.com/apache/incubator-pulsar/pull/1909
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/docker-images/latest-version-image/scripts/init-cluster.sh 
b/tests/docker-images/latest-version-image/scripts/init-cluster.sh
index 24aa0a3959..926845d5a7 100755
--- a/tests/docker-images/latest-version-image/scripts/init-cluster.sh
+++ b/tests/docker-images/latest-version-image/scripts/init-cluster.sh
@@ -20,7 +20,7 @@
 
 set -x
 
-ZNODE="/initialized"
+ZNODE="/initialized-$clusterName"
 
 bin/watch-znode.py -z $zkServers -p / -w
 
@@ -28,7 +28,7 @@ bin/watch-znode.py -z $zkServers -p $ZNODE -e
 if [ $? != 0 ]; then
     echo Initializing cluster
     bin/apply-config-from-env.py conf/bookkeeper.conf &&
-        bin/pulsar initialize-cluster-metadata --cluster $cluster --zookeeper 
$zkServers \
+        bin/pulsar initialize-cluster-metadata --cluster $clusterName 
--zookeeper $zkServers \
                    --configuration-store $configurationStore --web-service-url 
http://$pulsarNode:8080/ \
                    --broker-service-url pulsar://$pulsarNode:6650/ &&
         bin/watch-znode.py -z $zkServers -p $ZNODE -c
diff --git a/tests/docker-images/latest-version-image/scripts/run-bookie.sh 
b/tests/docker-images/latest-version-image/scripts/run-bookie.sh
index adaaced609..6e57a127b1 100755
--- a/tests/docker-images/latest-version-image/scripts/run-bookie.sh
+++ b/tests/docker-images/latest-version-image/scripts/run-bookie.sh
@@ -25,6 +25,6 @@ if [ -z "$NO_AUTOSTART" ]; then
     sed -i 's/autostart=.*/autostart=true/' /etc/supervisord/conf.d/bookie.conf
 fi
 
-bin/watch-znode.py -z $zkServers -p /initialized -w
+bin/watch-znode.py -z $zkServers -p /initialized-$clusterName -w
 exec /usr/bin/supervisord -c /etc/supervisord.conf
 
diff --git a/tests/docker-images/latest-version-image/scripts/run-broker.sh 
b/tests/docker-images/latest-version-image/scripts/run-broker.sh
index cef8b65c0d..6ed5d60c39 100755
--- a/tests/docker-images/latest-version-image/scripts/run-broker.sh
+++ b/tests/docker-images/latest-version-image/scripts/run-broker.sh
@@ -25,6 +25,6 @@ if [ -z "$NO_AUTOSTART" ]; then
     sed -i 's/autostart=.*/autostart=true/' /etc/supervisord/conf.d/broker.conf
 fi
 
-bin/watch-znode.py -z $zookeeperServers -p /initialized -w
+bin/watch-znode.py -z $zookeeperServers -p /initialized-$clusterName -w
 exec /usr/bin/supervisord -c /etc/supervisord.conf
 
diff --git a/tests/docker-images/latest-version-image/scripts/run-proxy.sh 
b/tests/docker-images/latest-version-image/scripts/run-proxy.sh
index 05b38b00aa..8c0c5c350d 100755
--- a/tests/docker-images/latest-version-image/scripts/run-proxy.sh
+++ b/tests/docker-images/latest-version-image/scripts/run-proxy.sh
@@ -25,6 +25,6 @@ if [ -z "$NO_AUTOSTART" ]; then
     sed -i 's/autostart=.*/autostart=true/' /etc/supervisord/conf.d/proxy.conf
 fi
 
-bin/watch-znode.py -z $zookeeperServers -p /initialized -w
+bin/watch-znode.py -z $zookeeperServers -p /initialized-$clusterName -w
 exec /usr/bin/supervisord -c /etc/supervisord.conf
 
diff --git 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-2-bookie-1-broker-unstarted-with-s3.yaml
 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-2-bookie-1-broker-unstarted-with-s3.yaml
index b80ef7cc56..6a2e3e28bc 100644
--- 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-2-bookie-1-broker-unstarted-with-s3.yaml
+++ 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-2-bookie-1-broker-unstarted-with-s3.yaml
@@ -58,7 +58,7 @@ init*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
-    - cluster=test
+    - clusterName=test
     - zkServers=zookeeper
     - configurationStore=configuration-store:2184
     - pulsarNode=pulsar-broker1
@@ -76,6 +76,7 @@ bookkeeper1*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
+    - clusterName=test
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
   labels:
@@ -92,6 +93,7 @@ bookkeeper2*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
+    - clusterName=test
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
   labels:
diff --git 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker-unstarted.yaml
 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker-unstarted.yaml
index d2c34cc845..6fe4d980a4 100644
--- 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker-unstarted.yaml
+++ 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker-unstarted.yaml
@@ -58,7 +58,7 @@ init*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
-    - cluster=test
+    - clusterName=test
     - zkServers=zookeeper
     - configurationStore=configuration-store:2184
     - pulsarNode=pulsar-broker1
@@ -76,6 +76,7 @@ bookkeeper1*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
+    - clusterName=test
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
   labels:
@@ -92,6 +93,7 @@ bookkeeper2*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
+    - clusterName=test
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
   labels:
@@ -108,6 +110,7 @@ bookkeeper3*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
+    - clusterName=test
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
   labels:
@@ -126,9 +129,9 @@ pulsar-broker1*:
   aliases:
     - pulsar-broker1
   env:
+    - clusterName=test
     - zookeeperServers=zookeeper
     - configurationStoreServers=configuration-store:2184
-    - clusterName=test
     - NO_AUTOSTART=true
   labels:
     cluster: test
@@ -146,9 +149,9 @@ pulsar-broker2*:
   aliases:
     - pulsar-broker2
   env:
+    - clusterName=test
     - zookeeperServers=zookeeper
     - configurationStoreServers=configuration-store:2184
-    - clusterName=test
     - NO_AUTOSTART=true
   labels:
     cluster: test
@@ -166,9 +169,9 @@ pulsar-proxy*:
   aliases:
     - pulsar-broker2
   env:
+    - clusterName=test
     - zookeeperServers=zookeeper
     - configurationStoreServers=configuration-store:2184
-    - clusterName=test
     - NO_AUTOSTART=true
   labels:
     cluster: test
diff --git 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker.yaml
 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker.yaml
index 3695f2a2c9..1a205747d1 100644
--- 
a/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker.yaml
+++ 
b/tests/integration-tests-topologies/src/main/resources/cube-definitions/single-cluster-3-bookie-2-broker.yaml
@@ -58,7 +58,7 @@ init*:
   await:
     strategy: org.apache.pulsar.tests.NoopAwaitStrategy
   env:
-    - cluster=test
+    - clusterName=test
     - zkServers=zookeeper
     - configurationStore=configuration-store:2184
     - pulsarNode=pulsar-broker1
@@ -78,6 +78,7 @@ bookkeeper1*:
   env:
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
+    - clusterName=test
   labels:
     cluster: test
     service: bookie
@@ -110,6 +111,7 @@ bookkeeper3*:
   env:
     - zkServers=zookeeper
     - useHostNameAsBookieID=true
+    - clusterName=test
   labels:
     cluster: test
     service: bookie


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to