kill Solr example server if it hasn't started after 30 minutes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1463057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-03-31 21:30:31 +00:00
parent 1f964c5764
commit 5d8cc29da9
1 changed files with 14 additions and 12 deletions

View File

@ -766,19 +766,21 @@ def testSolrExample(unpackPath, javaPath, isSrc):
serverThread.setDaemon(True)
serverThread.start()
# Make sure Solr finishes startup:
if not startupEvent.wait(1800):
raise RuntimeError('startup took more than 30 minutes')
if failureEvent.isSet():
logFile = os.path.abspath(logFile)
print
print('Startup failed; see log %s' % logFile)
printFileContents(logFile)
raise RuntimeError('failure on startup; see log %s' % logFile)
print(' startup done')
try:
# Make sure Solr finishes startup:
if not startupEvent.wait(1800):
raise RuntimeError('startup took more than 30 minutes')
if failureEvent.isSet():
logFile = os.path.abspath(logFile)
print
print('Startup failed; see log %s' % logFile)
printFileContents(logFile)
raise RuntimeError('failure on startup; see log %s' % logFile)
print(' startup done')
print(' test utf8...')
run('sh ./exampledocs/test_utf8.sh', 'utf8.log')
print(' index example docs...')