sijie closed pull request #1611: cpp tests should wait for standalone up
URL: https://github.com/apache/incubator-pulsar/pull/1611
 
 
   

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/pulsar-client-cpp/run-unit-tests.sh 
b/pulsar-client-cpp/run-unit-tests.sh
index 0513bba57..466eae061 100755
--- a/pulsar-client-cpp/run-unit-tests.sh
+++ b/pulsar-client-cpp/run-unit-tests.sh
@@ -34,16 +34,26 @@ PULSAR_STANDALONE_CONF=$PWD/test-conf/standalone-ssl.conf 
pulsar-dist/bin/pulsar
               --zookeeper-dir data2/standalone/zookeeper --bookkeeper-dir \
               data2/standalone/bookkeeper > broker-tls.log &
 auth_pid=$!;
-sleep 10
+
+echo "Wait for non-tls standalone up"
+until grep "Created tenant public" broker.log; do sleep 5; done
 
 # create property for test
 PULSAR_CLIENT_CONF=$PWD/test-conf/client.conf pulsar-dist/bin/pulsar-admin 
tenants create prop -r "" -c "unit"
+echo "Created tenant 'prop' - $?"
+
 PULSAR_CLIENT_CONF=$PWD/test-conf/client.conf pulsar-dist/bin/pulsar-admin 
tenants create property -r "" -c "cluster"
+echo "Created tenant 'property' - $?"
 
 PULSAR_CLIENT_CONF=$PWD/test-conf/client-ssl.conf pulsar-dist/bin/pulsar-admin 
clusters create \
         --url http://localhost:9765/ --url-secure https://localhost:9766/ \
         --broker-url pulsar://localhost:9885/ --broker-url-secure 
pulsar+ssl://localhost:9886/ \
         cluster
+PULSAR_CLIENT_CONF=$PWD/test-conf/client-ssl.conf pulsar-dist/bin/pulsar-admin 
clusters create \
+        --url http://localhost:9765/ --url-secure https://localhost:9766/ \
+        --broker-url pulsar://localhost:9885/ --broker-url-secure 
pulsar+ssl://localhost:9886/ \
+        unit
+
 sleep 5
 
 cd tests


 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to