Browse Source

debug CI installation issue

marko asplund 11 years ago
parent
commit
a4b20fdfe4
2 changed files with 3 additions and 1 deletions
  1. 1 0
      frameworks/Java/servlet3-cass/setup.py
  2. 2 1
      toolset/run-ci.py

+ 1 - 0
frameworks/Java/servlet3-cass/setup.py

@@ -17,6 +17,7 @@ def start(args, logfile, errfile):
       return 0
     subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("cp servlet3-cass/target/servlet3-cass.war $RESIN_HOME/webapps/", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("echo "desc keyspace tfb" | sudo cqlsh", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:

+ 2 - 1
toolset/run-ci.py

@@ -348,7 +348,8 @@ class CIRunnner:
     sudo -u benchmarkdbuser psql hello_world < config/create-postgres.sql
 
     # Setup Apache Cassandra
-    for i in 1 2 3; do sudo cqlsh -f config/cassandra/create-keyspace.cql && break || sleep 15; done
+    until nc -z localhost 9160 ; do echo Waiting for Cassandra; sleep 1; done
+    sudo cqlsh -f config/cassandra/create-keyspace.cql
     python config/cassandra/db-data-gen.py | sudo cqlsh
 
     # Setup MongoDB (see install above)