From 4a0526db85bc28e3e10c9a0ee98474a24e3dcb4a Mon Sep 17 00:00:00 2001 From: "Nelson,Thomas(tn1381)(arthurdent3)" Date: Tue, 16 Oct 2018 19:05:47 -0400 Subject: Update runcql Change-Id: Ieedb7a180de8bd591c610d0846e33b3a95daad8d Issue-ID: MUSIC-147 Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) --- distribution/cassandra_job/runcql.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/distribution/cassandra_job/runcql.sh b/distribution/cassandra_job/runcql.sh index 078edf77..f935a350 100644 --- a/distribution/cassandra_job/runcql.sh +++ b/distribution/cassandra_job/runcql.sh @@ -1,12 +1,12 @@ #! /bin/bash -re='^[0-9]+$' -if [[ $TIMEOUT =~ $re ]]; then - echo "TIMEOUT not set or error, defaulting to 10 seconds" - TIMEOUT=10 +if [ -z "$TIMEOUT" ]; then + TIMEOUT=10; fi TO="--request-timeout=$TIMEOUT" if [ $CASS_HOSTNAME ]; then + echo "Sleeping for 60 seconds before running cql"; + sleep 60; >&2 echo "#############################################" >&2 echo "############## Let run cql's ################" >&2 echo "#############################################" @@ -71,9 +71,9 @@ if [ $CASS_HOSTNAME ]; then fi >&2 echo "Running Test - look for admin keyspace:" - >&2 echo "Running cqlsh -u $DEF_USER -p $DEF_PASS -e "describe keyspaces;" ${CASS_HOSTNAME} ${PORT}" + >&2 echo "Running cqlsh -u $USERNAME -p $PASSWORD -e "select * from system_auth.roles;" ${CASS_HOSTNAME} ${PORT}" sleep 1; - if cqlsh $TO -u $DEF_USER -p $DEF_PASS -e "describe keyspaces;" ${CASS_HOSTNAME} ${PORT} | grep admin; + if cqlsh $TO -u $USERNAME -p $PASSWORD -e "select * from system_auth.roles;" ${CASS_HOSTNAME} ${PORT} then >&2 echo "Success - running test"; else -- cgit 1.2.3-korg