lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4211) in LuceneTestCase.maybeWrapReader: add an asserting impl
Date Fri, 13 Jul 2012 14:07:40 GMT

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

Robert Muir updated LUCENE-4211:
--------------------------------

    Attachment: LUCENE-4211.patch

Latest patch: with all randomization turned back on, but also fixing the freq() bug, and also
asserting nobody calls this stuff after NO_MORE_DOCS.

But now i found another bug, in join. I suspect it could be a bug in MultiDocsEnum or something,
not returning -1 or NO_MORE_DOCS for the initial docId() before next() or advance() is called...
(this would break one of BooleanScorer2's subscorers).

{noformat}
common.test:
    [mkdir] Created dir: /home/rmuir/workspace/lucene-trunk/lucene/build/join/test
[junit4:junit4] <JUnit4> says hallo! Master seed: B08881265B54D7BC
[junit4:junit4] Executing 2 suites with 2 JVMs.
[junit4:junit4] Suite: org.apache.lucene.search.join.TestBlockJoin
[junit4:junit4] Completed on J1 in 2.88s, 7 tests
[junit4:junit4]  
[junit4:junit4] Suite: org.apache.lucene.search.join.TestJoinUtil
[junit4:junit4] FAILURE 3.42s J0 | TestJoinUtil.testMultiValueRandomJoin
[junit4:junit4]    > Throwable #1: java.lang.AssertionError: invalid initial doc id: 76
[junit4:junit4]    > 	at __randomizedtesting.SeedInfo.seed([B08881265B54D7BC:C1ED59C3AAE361B0]:0)
[junit4:junit4]    > 	at org.apache.lucene.index.AssertingAtomicReader$AssertingDocsEnum.<init>(AssertingAtomicReader.java:239)
[junit4:junit4]    > 	at org.apache.lucene.index.AssertingAtomicReader$AssertingTermsEnum.docs(AssertingAtomicReader.java:137)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$MVInnerScorer.nextDoc(TermsIncludingScoreQuery.java:251)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$SVInnerScorer.advance(TermsIncludingScoreQuery.java:197)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$1.explain(TermsIncludingScoreQuery.java:104)
[junit4:junit4]    > 	at org.apache.lucene.search.AssertingIndexSearcher$1.explain(AssertingIndexSearcher.java:63)
[junit4:junit4]    > 	at org.apache.lucene.search.IndexSearcher.explain(IndexSearcher.java:618)
[junit4:junit4]    > 	at org.apache.lucene.search.IndexSearcher.explain(IndexSearcher.java:599)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TestJoinUtil.executeRandomJoin(TestJoinUtil.java:349)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TestJoinUtil.testMultiValueRandomJoin(TestJoinUtil.java:243)
[junit4:junit4]    > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit4:junit4]    > 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit4:junit4]    > 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit4:junit4]    > 	at java.lang.reflect.Method.invoke(Method.java:597)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1995)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$1100(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:818)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:877)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:891)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:32)
[junit4:junit4]    > 	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleReportUncaughtExceptions$1.evaluate(TestRuleReportUncaughtExceptions.java:68)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:825)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$700(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$3$1.run(RandomizedRunner.java:671)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:697)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:736)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:747)
[junit4:junit4]    > 	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleReportUncaughtExceptions$1.evaluate(TestRuleReportUncaughtExceptions.java:68)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIcuHack$1.evaluate(TestRuleIcuHack.java:51)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleNoInstanceHooksOverrides$1.evaluate(TestRuleNoInstanceHooksOverrides.java:53)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleNoStaticHooksShadowing$1.evaluate(TestRuleNoStaticHooksShadowing.java:52)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:36)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSuite(RandomizedRunner.java:605)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$400(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:551)
[junit4:junit4]    > 
[junit4:junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestJoinUtil -Dtests.method=testMultiValueRandomJoin
-Dtests.seed=B08881265B54D7BC -Dtests.slow=true -Dtests.codec=Asserting -Dtests.locale=zh_CN
-Dtests.timezone=Etc/GMT+8 -Dtests.file.encoding=US-ASCII
[junit4:junit4]   2>
[junit4:junit4] FAILURE 0.63s J0 | TestJoinUtil.testSingleValueRandomJoin
[junit4:junit4]    > Throwable #1: java.lang.AssertionError: invalid initial doc id: 117
[junit4:junit4]    > 	at __randomizedtesting.SeedInfo.seed([B08881265B54D7BC:5C30906CD397CB63]:0)
[junit4:junit4]    > 	at org.apache.lucene.index.AssertingAtomicReader$AssertingDocsEnum.<init>(AssertingAtomicReader.java:239)
[junit4:junit4]    > 	at org.apache.lucene.index.AssertingAtomicReader$AssertingTermsEnum.docs(AssertingAtomicReader.java:137)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$SVInnerScorer.nextDoc(TermsIncludingScoreQuery.java:187)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$SVInnerScorer.advance(TermsIncludingScoreQuery.java:197)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TermsIncludingScoreQuery$1.explain(TermsIncludingScoreQuery.java:104)
[junit4:junit4]    > 	at org.apache.lucene.search.AssertingIndexSearcher$1.explain(AssertingIndexSearcher.java:63)
[junit4:junit4]    > 	at org.apache.lucene.search.IndexSearcher.explain(IndexSearcher.java:618)
[junit4:junit4]    > 	at org.apache.lucene.search.IndexSearcher.explain(IndexSearcher.java:599)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TestJoinUtil.executeRandomJoin(TestJoinUtil.java:349)
[junit4:junit4]    > 	at org.apache.lucene.search.join.TestJoinUtil.testSingleValueRandomJoin(TestJoinUtil.java:235)
[junit4:junit4]    > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit4:junit4]    > 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit4:junit4]    > 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit4:junit4]    > 	at java.lang.reflect.Method.invoke(Method.java:597)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1995)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$1100(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:818)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:877)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:891)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:32)
[junit4:junit4]    > 	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleReportUncaughtExceptions$1.evaluate(TestRuleReportUncaughtExceptions.java:68)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:825)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$700(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$3$1.run(RandomizedRunner.java:671)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:697)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:736)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:747)
[junit4:junit4]    > 	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleReportUncaughtExceptions$1.evaluate(TestRuleReportUncaughtExceptions.java:68)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIcuHack$1.evaluate(TestRuleIcuHack.java:51)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleNoInstanceHooksOverrides$1.evaluate(TestRuleNoInstanceHooksOverrides.java:53)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleNoStaticHooksShadowing$1.evaluate(TestRuleNoStaticHooksShadowing.java:52)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:36)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
[junit4:junit4]    > 	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSuite(RandomizedRunner.java:605)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$400(RandomizedRunner.java:132)
[junit4:junit4]    > 	at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:551)
[junit4:junit4]    > 
[junit4:junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestJoinUtil -Dtests.method=testSingleValueRandomJoin
-Dtests.seed=B08881265B54D7BC -Dtests.slow=true -Dtests.codec=Asserting -Dtests.locale=zh_CN
-Dtests.timezone=Etc/GMT+8 -Dtests.file.encoding=US-ASCII
[junit4:junit4]   2>
[junit4:junit4]    > (@AfterClass output)
[junit4:junit4]   2> NOTE: test params are: codec=Asserting, sim=RandomSimilarityProvider(queryNorm=true,coord=true):
{to=IB SPL-DZ(0.3), id=DefaultSimilarity, movieId=IB SPL-L1, price=DFR I(ne)1, description=IB
LL-D3(800.0), name=DFR I(F)B3(800.0), value=DFR I(F)3(800.0), subtitle=IB LL-L1, from=DFR
I(ne)Z(0.3), productId=DFR I(n)L2}, locale=zh_CN, timezone=Etc/GMT+8
[junit4:junit4]   2> NOTE: Linux 3.2.0-24-generic amd64/Sun Microsystems Inc. 1.6.0_24
(64-bit)/cpus=8,threads=1,free=266099840,total=348258304
[junit4:junit4]   2> NOTE: All tests run in this JVM: [TestJoinUtil]
[junit4:junit4]   2> 
[junit4:junit4] Completed on J0 in 4.43s, 4 tests, 2 failures <<< FAILURES!
[junit4:junit4]  
[junit4:junit4] JVM J0:     0.30 ..     5.12 =     4.82s
[junit4:junit4] JVM J1:     0.30 ..     3.65 =     3.36s
[junit4:junit4] Execution time total: 5.14 sec.
[junit4:junit4] Tests summary: 2 suites, 11 tests, 2 failures
{noformat}

                
> in LuceneTestCase.maybeWrapReader: add an asserting impl
> --------------------------------------------------------
>
>                 Key: LUCENE-4211
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4211
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/test
>            Reporter: Robert Muir
>         Attachments: LUCENE-4211.patch, LUCENE-4211.patch, LUCENE-4211.patch, LUCENE-4211.patch,
LUCENE-4211.patch, LUCENE-4211.patch, LUCENE-4211.patch, LUCENE-4211.patch, LUCENE-4211.patch
>
>
> It would be nice to wrap with FIR here sometimes,
> one that returns AssertingFields, etc etc.
> This way we could check if consumers are doing bogus things (like reading nextDoc after
it returned NO_MORE_DOCS, or TermsEnum.next after its exhausted, or things like that).
> This would also be nice to catch tests that do this rather than doing
> crazy debugging over whats not really a bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message