You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2015/08/14 18:03:11 UTC

svn commit: r1695936 - in /lucene/dev/branches/lucene_solr_5_3: ./ dev-tools/ dev-tools/scripts/smokeTestRelease.py

Author: thelabdude
Date: Fri Aug 14 16:03:10 2015
New Revision: 1695936

URL: http://svn.apache.org/r1695936
Log:
SOLR-7923: Rework the smoke tester to the techproducts example using bin/solr script to do all the work

Modified:
    lucene/dev/branches/lucene_solr_5_3/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/dev-tools/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/dev-tools/scripts/smokeTestRelease.py

Modified: lucene/dev/branches/lucene_solr_5_3/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/dev-tools/scripts/smokeTestRelease.py?rev=1695936&r1=1695935&r2=1695936&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/lucene_solr_5_3/dev-tools/scripts/smokeTestRelease.py Fri Aug 14 16:03:10 2015
@@ -827,36 +827,15 @@ def testSolrExample(unpackPath, javaPath
   except:
     print('      Stop failed due to: '+sys.exc_info()[0])
 
-  print('      starting Solr on port 8983 from %s' % unpackPath)
-  server = subprocess.Popen(['bin/solr', '-f', '-p', '8983'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, env=env)
-
-  startupEvent = threading.Event()
-  failureEvent = threading.Event()
-  serverThread = threading.Thread(target=readSolrOutput, args=(server, startupEvent, failureEvent, logFile))
-  serverThread.setDaemon(True)
-  serverThread.start()
-
+  print('      Running techproducts example on port 8983 from %s' % unpackPath)
   try:
+    runExampleStatus = subprocess.call(['bin/solr','-e','techproducts'])
+    if runExampleStatus != 0:
+      raise RuntimeError('Failed to run the techproducts example, check log for previous errors.')
 
-    # 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')
-    # Create the techproducts config (used to be collection1)
-    subprocess.call(['bin/solr','create_core','-c','techproducts','-d','sample_techproducts_configs'])
     os.chdir('example')
     print('      test utf8...')
     run('sh ./exampledocs/test_utf8.sh http://localhost:8983/solr/techproducts', 'utf8.log')
-    print('      index example docs...')
-    run('java -Durl=http://localhost:8983/solr/techproducts/update -jar ./exampledocs/post.jar ./exampledocs/*.xml', 'post-example-docs.log')
     print('      run query...')
     s = load('http://localhost:8983/solr/techproducts/select/?q=video')
     if s.find('<result name="response" numFound="3" start="0">') == -1:
@@ -871,23 +850,6 @@ def testSolrExample(unpackPath, javaPath
       os.chdir(unpackPath)
     subprocess.call(['bin/solr','stop','-p','8983'])
 
-    # Give it 10 seconds to gracefully shut down
-    serverThread.join(10.0)
-
-    if serverThread.isAlive():
-      # Kill server:
-      print('***WARNING***: Solr instance didn\'t respond to SIGINT; using SIGKILL now...')
-      os.kill(server.pid, signal.SIGKILL)
-
-      serverThread.join(10.0)
-
-      if serverThread.isAlive():
-        # Shouldn't happen unless something is seriously wrong...
-        print('***WARNING***: Solr instance didn\'t respond to SIGKILL; ignoring...')
-
-  if failureEvent.isSet():
-    raise RuntimeError('exception while reading Solr output')
-
   if isSrc:
     os.chdir(unpackPath+'/solr')
   else: