diff --git a/execution/run_uc1.sh b/execution/run_uc1.sh index b6dae93aaec32305b5ee5b5e24c5a2c020644cbe..02c46d8832fc800c57453570b14a6bf02681326a 100755 --- a/execution/run_uc1.sh +++ b/execution/run_uc1.sh @@ -111,25 +111,10 @@ echo "Finish topic deletion, print topics:" echo "Delete ZooKeeper configurations used for workload generation" kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation" echo "Waiting for deletion" - -while [ true ] +while kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 get /workload-generation" do - IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}') - found=0 - for element in "${array[@]}" - do - if [ "$element" == "workload-generation" ]; then - found=1 - break - fi - done - if [ $found -ne 1 ]; then - echo "ZooKeeper reset was successful." - break - else - echo "ZooKeeper reset was not successful. Retrying in 5s." - sleep 5s - fi + echo "Wait for ZooKeeper state deletion." + sleep 5s done echo "Deletion finished" diff --git a/execution/run_uc2.sh b/execution/run_uc2.sh index 7ba3c3960359bc0739ae0999474112542c310873..4544d3609ed807141455378b92ce3536ea2f92f6 100755 --- a/execution/run_uc2.sh +++ b/execution/run_uc2.sh @@ -116,25 +116,10 @@ echo "Finish topic deletion, print topics:" echo "Delete ZooKeeper configurations used for workload generation" kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation" echo "Waiting for deletion" - -while [ true ] +while kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 get /workload-generation" do - IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}') - found=0 - for element in "${array[@]}" - do - if [ "$element" == "workload-generation" ]; then - found=1 - break - fi - done - if [ $found -ne 1 ]; then - echo "ZooKeeper reset was successful." - break - else - echo "ZooKeeper reset was not successful. Retrying in 5s." - sleep 5s - fi + echo "Wait for ZooKeeper state deletion." + sleep 5s done echo "Deletion finished" diff --git a/execution/run_uc3.sh b/execution/run_uc3.sh index 5066ee9ef4fafa722b7b55313eaf77de3194215e..4f2323f937f19d01a73482dea6aeaf5e922a0a3f 100755 --- a/execution/run_uc3.sh +++ b/execution/run_uc3.sh @@ -112,25 +112,10 @@ echo "Finish topic deletion, print topics:" echo "Delete ZooKeeper configurations used for workload generation" kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation" echo "Waiting for deletion" - -while [ true ] +while kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 get /workload-generation" do - IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}') - found=0 - for element in "${array[@]}" - do - if [ "$element" == "workload-generation" ]; then - found=1 - break - fi - done - if [ $found -ne 1 ]; then - echo "ZooKeeper reset was successful." - break - else - echo "ZooKeeper reset was not successful. Retrying in 5s." - sleep 5s - fi + echo "Wait for ZooKeeper state deletion." + sleep 5s done echo "Deletion finished" diff --git a/execution/run_uc4.sh b/execution/run_uc4.sh index 673c6cb00f23094d77e6274524ed75325a25fea8..08a38498839ef3c50a39c1ccfbd26914993ffbd3 100755 --- a/execution/run_uc4.sh +++ b/execution/run_uc4.sh @@ -111,25 +111,10 @@ echo "Finish topic deletion, print topics:" echo "Delete ZooKeeper configurations used for workload generation" kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation" echo "Waiting for deletion" - -while [ true ] +while kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 get /workload-generation" do - IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}') - found=0 - for element in "${array[@]}" - do - if [ "$element" == "workload-generation" ]; then - found=1 - break - fi - done - if [ $found -ne 1 ]; then - echo "ZooKeeper reset was successful." - break - else - echo "ZooKeeper reset was not successful. Retrying in 5s." - sleep 5s - fi + echo "Wait for ZooKeeper state deletion." + sleep 5s done echo "Deletion finished"