You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2010/10/21 09:06:16 UTC

[jira] Assigned: (SOLR-2185) QueryElevationComponentTest depends on execution order

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

Simon Willnauer reassigned SOLR-2185:
-------------------------------------

    Assignee: Simon Willnauer

> 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: 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