Skip to content

Commit

Permalink
Merge pull request #663 from hawkular/wait_cassandra_release
Browse files Browse the repository at this point in the history
Check the status of Cassandra's binary interface and wait up to 60 se…
  • Loading branch information
jsanda committed Oct 25, 2016
2 parents 4a365aa + a6d0f37 commit 7652747
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .travis.install.cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,16 @@ export HEAP_NEWSIZE="100M"
export MAX_HEAP_SIZE="1G"

nohup sh ${CASSANDRA_HOME}/bin/cassandra -f -p ${HOME}/cassandra.pid > ${CASSANDRA_HOME}/logs/stdout.log 2>&1 &


CASSANDRA_STATUS="undecided"
TOTAL_WAIT=0;
while [ "$CASSANDRA_STATUS" != "running" ] && [ $TOTAL_WAIT -lt 60 ]; do
CASSANDRA_STATUS=`${CASSANDRA_HOME}/bin/nodetool statusbinary | xargs`
echo "Cassandra server status: $CASSANDRA_STATUS."

sleep 3

TOTAL_WAIT=$((TOTAL_WAIT+3))
echo "Waited $TOTAL_WAIT seconds for Cassandra to start."
done

0 comments on commit 7652747

Please sign in to comment.