Skip to content

Commit

Permalink
Don't try to start solr blindly, check first, if it is working already
Browse files Browse the repository at this point in the history
  • Loading branch information
do3cc committed Sep 8, 2015
1 parent 7386341 commit 383e386
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/collective/solr/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def _find_available_solr_port(self):
def setUp(self):
"""Start Solr and poll until it is up and running.
"""
status = subprocess.check_output(['./solr-instance', 'status'],
cwd=BUILDOUT_DIR)
if status != 'Solr not running.\n':
raise Exception("Sor is already running: %s", status)
self.proc = subprocess.call(
'./solr-instance start -Djetty.port={0}'.format(self.solr_port),
shell=True,
Expand Down

0 comments on commit 383e386

Please sign in to comment.