lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SOLR-2185) QueryElevationComponentTest depends on execution order
Date Thu, 21 Oct 2010 07:16:14 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Simon Willnauer resolved SOLR-2185.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1

> QueryElevationComponentTest depends on execution order
> ------------------------------------------------------
>
>                 Key: SOLR-2185
>                 URL: https://issues.apache.org/jira/browse/SOLR-2185
>             Project: Solr
>          Issue Type: Test
>          Components: SearchComponents - other
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.1, 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(SolrTestCaseJ4.java:369)
> 	at org.apache.solr.handler.component.QueryElevationComponentTest.testInterface(QueryElevationComponentTest.java:100)
> 	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:881)
> 	at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:847)
> 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
boosted</str></doc></result>
> </response>
> 	request was:q.alt=*:*&qt=/elevate&defType=dismax
> 	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:362)
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message