summaryrefslogtreecommitdiffstats
path: root/distribution
diff options
context:
space:
mode:
Diffstat (limited to 'distribution')
-rw-r--r--distribution/cassandra_job/runcql.sh12
1 files 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