[ 
https://issues.apache.org/jira/browse/SOLR-2673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070162#comment-13070162
 ] 

Yonik Seeley commented on SOLR-2673:
------------------------------------

Hmmm... notice the "numFound":5
There are only 4 documents added in this test.
If I add a clearIndex() at the top of the test method, everything is fine.

But why would that be necessary?
It looks like with Java7, that the test methods are not being run in the order 
they are declared in the file.
That's probably the root cause of the other Solr test failures with Java7 too.

> (Possibly) Caching(???)  issues with TestFiltering and RequiredFieldsTest 
> (and few more)
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-2673
>                 URL: https://issues.apache.org/jira/browse/SOLR-2673
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>              Labels: Java7
>
> With Java7 (b147) Solr tests fail, seems to be because of caching (maybe 
> ConcurrentLRUCache violates Java Memory Model, which can be seen in Java 7 
> only):
> Example TestFiltering (passes sometimes):
> {noformat}
> junit-sequential:
>     [junit] Testsuite: org.apache.solr.search.TestFiltering
>     [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 6,082 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] VII 24, 2011 4:53:02 AM org.apache.solr.SolrTestCaseJ4 assertJQ
>     [junit] SEVERE: query failed JSON validation. error=mismatch: '3'!='2' @ 
> response/docs/[0]/val_i
>     [junit]  expected =/response/docs==[{"val_i":3}]
>     [junit]  response = {
>     [junit]   "responseHeader":{
>     [junit]     "status":0,
>     [junit]     "QTime":11},
>     [junit]   "response":{"numFound":5,"start":2,"docs":[
>     [junit]       {
>     [junit]         "val_i":2}]
>     [junit]   }}
>     [junit]  request = 
> fl=val_i&sort=val_i+asc&start=2&q={!cache%3Dfalse}*:*&rows=1
>     [junit] NOTE: reproduce with: ant test -Dtestcase=TestFiltering 
> -Dtestmethod=testCaching -Dtests.seed=9127548164660185224:-55134
> 75064094727964
>     [junit] NOTE: test params are: codec=RandomCodecProvider: 
> {id=MockFixedIntBlock(blockSize=571), val_i=MockFixedIntBlock(blockSiz
> e=571)}, locale=bg, timezone=Pacific/Galapagos
>     [junit] NOTE: all tests run in this JVM:
>     [junit] [TestFiltering]
>     [junit] NOTE: Windows 7 6.1 amd64/Oracle Corporation 1.7.0 
> (64-bit)/cpus=2,threads=1,free=253309552,total=262799360
>     [junit] ------------- ---------------- ---------------
>     [junit] Testcase: testCaching(org.apache.solr.search.TestFiltering):      
>   Caused an ERROR
>     [junit] mismatch: '3'!='2' @ response/docs/[0]/val_i
>     [junit] java.lang.RuntimeException: mismatch: '3'!='2' @ 
> response/docs/[0]/val_i
>     [junit]     at 
> org.apache.solr.SolrTestCaseJ4.assertJQ(SolrTestCaseJ4.java:467)
>     [junit]     at 
> org.apache.solr.SolrTestCaseJ4.assertJQ(SolrTestCaseJ4.java:415)
>     [junit]     at 
> org.apache.solr.search.TestFiltering.testCaching(TestFiltering.java:105)
>     [junit]     at 
> org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1486)
>     [junit]     at 
> org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1404)
>     [junit]
>     [junit]
>     [junit] Test org.apache.solr.search.TestFiltering FAILED
> {noformat}
> It is definitely not a Hotspot issue, as it also happens with -Xint and 
> -Xbatch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to