lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <>
Subject [jira] Commented: (SOLR-2185) QueryElevationComponentTest depends on execution order
Date Thu, 21 Oct 2010 07:06:15 GMT


Simon Willnauer commented on SOLR-2185:

seems like this has recently been removed in [r1022735|]
but was added [here|]
for the same reason.  I will fix though

> QueryElevationComponentTest depends on execution order
> ------------------------------------------------------
>                 Key: SOLR-2185
>                 URL:
>             Project: Solr
>          Issue Type: Test
>          Components: SearchComponents - other
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
> QueryElevationComponentTest fails if JUnit executes testSorting() before testInterface()
since there is already data in the index which testInterface expects to be empty. 
> {noformat}
> java.lang.RuntimeException: Exception during query
> 	at org.apache.solr.SolrTestCaseJ4.assertQ(
> 	at org.apache.solr.handler.component.QueryElevationComponentTest.testInterface(
> 	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(
> 	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(
> Caused by: java.lang.RuntimeException: REQUEST FAILED: xpath=//*[@numFound='0']
> 	xml response was: <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int name="QTime">9</int><lst
name="params"><str name="q.alt">*:*</str><str name="qt">/elevate</str><str
name="defType">dismax</str></lst></lst><result name="response" numFound="6"
start="0"><doc><str name="id">a</str><arr name="str_s"><str>a</str></arr><str
name="title">ipod</str></doc><doc><str name="id">b</str><arr
name="str_s"><str>b</str></arr><str name="title">ipod ipod</str></doc><doc><str
name="id">c</str><arr name="str_s"><str>c</str></arr><str
name="title">ipod ipod ipod</str></doc><doc><str name="id">x</str><arr
name="str_s"><str>x</str></arr><str name="title">boosted</str></doc><doc><str
name="id">y</str><arr name="str_s"><str>y</str></arr><str
name="title">boosted boosted</str></doc><doc><str name="id">z</str><arr
name="str_s"><str>z</str></arr><str name="title">boosted boosted
> </response>
> 	request was:q.alt=*:*&qt=/elevate&defType=dismax
> 	at org.apache.solr.SolrTestCaseJ4.assertQ(
> NOTE: reproduce with: ant test -Dtestcase=QueryElevationComponentTest -Dtestmethod=testInterface
-Dtests.seed=-9078717212967910902:2677111434934379417 -Dtests.multiplier=3
> {noformat}
> it is necessarily reproducible since it depends on JUnit and its execution order which
can be different. If i move the testSorting() up above testInterface() it fails on my machine.
> I guess a setup method would do the job:
> {code}
> @Override
>   public void setUp() throws Exception{
>     super.setUp();
>     clearIndex();
>     assertU(commit());
>     assertU(optimize());
>   }
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message