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

Uwe Schindler commented on SOLR-2673:
-------------------------------------

bq. I doubt its truly random... it may be undefined but for a given jre its 
probably typically the same each time.

Its somehow random in Java 7. If I run the same test multiple times, sometimes 
it fails sometimes it succeeds. Very strange, but it seems to be related to 
class loading and hotspot (maybe it uses some internal hotspot caches to 
speedup reflective access).

> Some Solr tests depend on order of test methods in source file, but Java 7 
> seems to no longer ensure that
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2673
>                 URL: https://issues.apache.org/jira/browse/SOLR-2673
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>              Labels: Java7
>             Fix For: 3.4, 4.0
>
>         Attachments: SOLR-2673.patch
>
>
> 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