MockGraphTokenFilter threw NPE here because its "random" was never set.

I committed a fix with a better error (and also made it reset its
"random" to null on close() to ensure its pickier and not sneakily
consuming random bits and so on)

On Mon, Sep 23, 2013 at 3:08 PM, Robert Muir <[email protected]> wrote:
> I am looking at it: the issue is in MockGraphTokenFilter...
>
> first i will make a commit so when it gets an unexpected exception
> (like the NPE here), that you get full stack trace!
>
> On Mon, Sep 23, 2013 at 1:37 PM, Uwe Schindler <[email protected]> wrote:
>> Hey,
>> I will take care tomorrow. This is related to Robert's and my changes.
>> Uwe
>>
>>
>>
>> Policeman Jenkins Server <[email protected]> schrieb:
>>>
>>> Build: http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/7593/
>>> Java: 32bit/jdk1.7.0_40 -client -XX:+UseParallelGC
>>>
>>> 1 tests failed.
>>> REGRESSION:
>>> org.apache.lucene.analysis.core.TestRandomChains.testRandomChains
>>>
>>> Error Message:
>>> got wrong exception when reset() not called:
>>> java.lang.NullPointerException
>>>
>>> Stack Trace:
>>> java.lang.AssertionError: got wrong exception when reset() not called:
>>> java.lang.NullPointerException
>>>  at
>>> __randomizedtesting.SeedInfo.seed([D41D4BF8A0CA5DD4:E9FC6299E7D84014]:0)
>>>  at org.junit.Assert.fail(Assert.java:93)
>>>  at
>>> org.apache.lucene.analysis.BaseTokenStreamTestCase.checkResetException(BaseTokenStreamTestCase.java:395)
>>>  at
>>> org.apache.lucene.analysis.BaseTokenStreamTestCase.checkRandomData(BaseTokenStreamTestCase.java:476)
>>>  at
>>>
>>> org.apache.lucene.analysis.core.TestRandomChains.testRandomChains(TestRandomChains.java:909)
>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>  at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>  at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>  at java.lang.reflect.Method.invoke(Method.java:606)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1559)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner.access$600(RandomizedRunner.java:79)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:737)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:773)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:787)
>>>  at
>>>
>>> org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
>>>  at
>>> org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:51)
>>>  at
>>> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
>>>  at
>>> org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:49)
>>>  at
>>> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
>>>  at
>>> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
>>>  at
>>> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:358)
>>>  at
>>>
>>> com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:782)
>>>  at
>>> com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:442)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:746)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:648)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:682)
>>>  at
>>> com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:693)
>>>  at
>>> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
>>>  at
>>> org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
>>>  at
>>>
>>> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
>>>  at
>>> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:43)
>>>  at
>>> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
>>>  at
>>> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70)
>>>  at
>>> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
>>>  at
>>> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
>>>  at
>>>
>>> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:358)
>>>  at java.lang.Thread.run(Thread.java:724)
>>>
>>>
>>>
>>>
>>> Build Log:
>>> [...truncated 5083 lines...]
>>>    [junit4] Suite: org.apache.lucene.analysis.core.TestRandomChains
>>>    [junit4]   2> Exception from random analyzer:
>>>    [junit4]   2> charfilters=
>>>    [junit4]   2> tokenizer=
>>>    [junit4]   2>
>>> org.apache.lucene.analysis.pattern.PatternTokenizer(org.apache.lucene.analysis.core.TestRandomChains$CheckThatYouDidntReadAnythingReaderWrapper@1c4f3c1,
>>> a, -78)
>>>    [junit4]   2> filters=
>>>    [junit4]   2>
>>> org.apache.lucene.analysis.pattern.PatternCaptureGroupTokenFilter(org.apache.lucene.analysis.ValidatingTokenFilter@1,
>>> true, [Ljava.util.regex.Pattern;@15f07e3)
>>>    [junit4]   2>
>>> org.apache.lucene.analysis.MockGraphTokenFilter(java.util.Random@1fed204,
>>> org.apache.lucene.analysis.ValidatingTokenFilter@20)
>>>
>>> [junit4]   2> offsetsAreCorrect=true
>>>    [junit4]   2> NOTE: reproduce with: ant test
>>> -Dtestcase=TestRandomChains -Dtests.method=testRandomChains
>>> -Dtests.seed=D41D4BF8A0CA5DD4 -Dtests.multiplier=3 -Dtests.slow=true
>>> -Dtests.locale=ar_SY -Dtests.timezone=Indian/Reunion
>>> -Dtests.file.encoding=UTF-8
>>>    [junit4] FAILURE 9.10s J0 | TestRandomChains.testRandomChains <<<
>>>    [junit4]    > Throwable #1: java.lang.AssertionError: got wrong
>>> exception when reset() not called: java.lang.NullPointerException
>>>    [junit4]    >  at
>>> __randomizedtesting.SeedInfo.seed([D41D4BF8A0CA5DD4:E9FC6299E7D84014]:0)
>>>    [junit4]    >  at
>>> org.apache.lucene.analysis.BaseTokenStreamTestCase.checkResetException(BaseTokenStreamTestCase.java:395)
>>>    [junit4]    >  at
>>> org.apache.lucene.analysis.BaseTokenStreamTestCase.checkRandomData(BaseTokenStreamTestCase.java:476)
>>>    [junit4]    >  at
>>>
>>> org.apache.lucene.analysis.core.TestRandomChains.testRandomChains(TestRandomChains.java:909)
>>>    [junit4]    >  at java.lang.Thread.run(Thread.java:724)
>>>    [junit4]   2> NOTE: test params are: codec=Lucene45:
>>> {dummy=Lucene41(blocksize=128)}, docValues:{},
>>> sim=RandomSimilarityProvider(queryNorm=false,coord=yes): {dummy=IB LL-D1},
>>> locale=ar_SY, timezone=Indian/Reunion
>>>    [junit4]   2> NOTE: Linux 3.2.0-53-generic i386/Oracle Corporation
>>> 1.7.0_40 (32-bit)/cpus=8,threads=1,free=36249960,total=234356736
>>>    [junit4]   2> NOTE: All tests run in this JVM: [TestThaiAnalyzer,
>>> TestPatternReplaceFilter, TestLatvianAnalyzer,
>>> TestNorwegianMinimalStemFilter, TestStemmerOverrideFilterFactory,
>>> TestReverseStringFilterFactory, TestSnowballVocab, TestBrazilianStemmer,
>>> TestFinnishLightStemFilter, TestKStemFilterFactory, TestCharArraySet,
>>> TestMappingCharFilter, HunspellStemmerTest, TestGalicianAnalyzer,
>>> TestGalicianStemFilter, TestRemoveDuplicatesTokenFilter,
>>> TestGermanNormalizationFilterFactory, TestTurkishLowerCaseFilter,
>>> TestHunspellStemFilterFactory, TestTypeTokenFilter,
>>> TestCapitalizationFilter, TestBugInSomething,
>>> TestRemoveDuplicatesTokenFilterFactory, TestThaiWordFilterFactory,
>>> TestElisionFilterFactory, TestCzechStemmer, NGramTokenizerTest,
>>> DelimitedPayloadTokenFilterTest, TestArabicNormalizationFilter,
>>> TestSolrSynonymParser, TestFrenchMinimalStemFilter, TestSpanishAnalyzer,
>>> TestCharTokenizers, TestWordDelimiterFilter,
>>> TestPatternReplaceFilterFactory, TestPortugueseMinimalStemFilter,
>>> TestKStemmer, TestPathHierarchyTokenizer, TestFrenchLightStemFilter,
>>> TestCzechStemFilterFactory, TestRussianAnalyzer, TestDuelingAnalyzers,
>>> TestCJKWidthFilter, TestPatternReplaceCharFilter, TestIndonesianStemmer,
>>> TestCJKAnalyzer, TestSwedishAnalyzer, TestHindiAnalyzer,
>>> TestStemmerOverrideFilter, TestLatvianStemmer, TestKeepWordFilter,
>>> TestShingleFilterFactory, TestNorwegianAnalyzer,
>>> TestHyphenationCompoundWordTokenFilterFactory,
>>> TestGermanNormalizationFilter, TestSnowball, TestRandomChains]
>>>    [junit4] Completed on J0 in 9.43s, 1 test, 1 failure <<< FAILURES!
>>>
>>> [...truncated 328 lines...]
>>> BUILD FAILED
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/build.xml:421: The
>>> following error occurred while executing this line:
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/build.xml:401: The
>>> following error occurred while executing this line:
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/build.xml:39: The
>>> following error occurred while executing this line:
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/build.xml:557:
>>> The following error occurred while executing this line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/common-build.xml:1887:
>>> The following error occurred while executing this line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/analysis/build.xml:105:
>>> The following error occurred while executing this
>>> line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/analysis/build.xml:38:
>>> The following error occurred while executing this line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/module-build.xml:60:
>>> The following error occurred while executing this line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/common-build.xml:1230:
>>> The following error occurred while executing this line:
>>>
>>> /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/common-build.xml:873:
>>> There were test failures: 220 suites, 1230 tests, 1 failure, 1 ignored
>>>
>>> Total time: 11 minutes 49 seconds
>>> Build step 'Invoke Ant' marked build as failure
>>> Description set: Java: 32bit/jdk1.7.0_40 -client -XX:+UseParallelGC
>>> Archiving artifacts
>>> Recording test results
>>> Email was triggered for: Failure
>>> Sending email for trigger: Failure
>>>
>>>
>>>
>>> ________________________________
>>>
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>
>>
>> --
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, 28213 Bremen
>> http://www.thetaphi.de

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

Reply via email to