check if solr is up before testing
This commit is contained in:
parent
ecd1a7eda7
commit
1684ecba71
|
@ -4,7 +4,6 @@ python:
|
|||
- "2.7"
|
||||
install:
|
||||
- mkdir -p buildout-cache/downloads
|
||||
- python bootstrap.py -c travis.cfg
|
||||
- bin/buildout -N -c travis.cfg
|
||||
before_script: curl https://raw.github.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.6.2 SOLR_CONFS="testing-conf/schema.xml testing-conf/solrconfig.xml" SOLR_DOCS= bash
|
||||
script: bin/test
|
||||
- python bootstrap.py
|
||||
- bin/buildout -N -t 10
|
||||
script: bin/alltests
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
is_solr_up(){
|
||||
http_code=`echo $(curl -s -o /dev/null -w "%{http_code}" "http://localhost:8983/solr/admin/ping")`
|
||||
return `test $http_code = "200"`
|
||||
}
|
||||
|
||||
wait_for_solr(){
|
||||
while ! is_solr_up; do
|
||||
sleep 3
|
||||
done
|
||||
}
|
||||
|
||||
${buildout:directory}/bin/solr-instance start
|
||||
wait_for_solr()
|
||||
echo 'Solr is up. Running tests ...'
|
||||
${buildout:directory}/bin/test $*
|
||||
status=$?
|
||||
${buildout:directory}/bin/solr-instance stop
|
||||
|
|
Loading…
Reference in New Issue