Timothy Potter created SOLR-7923:
------------------------------------

             Summary: smokeTester doesn't check result of bin/solr actions
                 Key: SOLR-7923
                 URL: https://issues.apache.org/jira/browse/SOLR-7923
             Project: Solr
          Issue Type: Bug
          Components: scripts and tools
            Reporter: Timothy Potter


In the following run of the smokeTester, notice that the create_core command 
failed, but the tester still passed.

{code}
Crawl/parse...

Verify...
    test solr example w/ Java 8...
      start Solr instance 
(log=/home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0/solr-example.log)...
No process found for Solr node running on port 8983
      starting Solr on port 8983 from 
/home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0
      startup done

Creating new core 'techproducts' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=techproducts&instanceDir=techproducts


ERROR: Error CREATEing SolrCore 'techproducts': Unable to create core 
[techproducts] Caused by: Lock held by this virtual machine: 
/home/shalin/work/oss/smoke-5.3.0/unpack/solr-5.3.0/solr/server/solr/techproducts/data/index/write.lock

      test utf8...
      index example docs...
      run query...
      stop server using: bin/solr stop -p 8983
Sending stop command to Solr running on port 8983 ... waiting 5 seconds to 
allow Jetty process 18756 to stop gracefully.
    check NOTICE

Test Maven artifacts for Lucene and Solr...
    get POM templates
..........................................................
    download artifacts
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    verify that each binary artifact has a deployed POM...
    verify that there is an artifact for each POM template...
    verify Maven artifacts' md5/sha1 digests...
    check for javadoc and sources artifacts...
    verify deployed POMs' coordinates...
    verify maven artifact sigs 
...................................................................................................................................................................................
    unpack lucene-5.3.0.tgz...
    unpack solr-5.3.0.tgz...
    verify that Maven artifacts are same as in the binary distribution...
    verify JAR metadata/identity/no javax.* or java.* classes...
    verify JAR metadata/identity/no javax.* or java.* classes...
    unpack lucene-5.3.0.tgz...

SUCCESS! [1:22:31.148021]
{code}

The Python code needs to be fixed to check the return code of the bin/solr 
script. Specifically this call needs to check the return code from the 
subprocess.call invocation:

{code}
    
subprocess.call(['bin/solr','create_core','-c','techproducts','-d','sample_techproducts_configs'])
{code}

I verified that the bin/solr create_core action does return 1 if there's an 
error:

{code}
[~/dev/lw/projects/lucene_solr_5_3/solr]$ bin/solr create_core -c techproducts

ERROR: 
Core 'techproducts' already exists!
Checked core existence using Core API command:
http://localhost:8983/solr/admin/cores?action=STATUS&core=techproducts

[~/dev/lw/projects/lucene_solr_5_3/solr]$ echo $?
1
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to