This is a test bug that can only happen on branch_5x. The test tries to change the first X bytes of the file, but when the first X bytes happen to be the same as the original bytes, it retries, which causes MockDirectoryWrapper to complain that the file has already been written to. I fixed the test to just generate random bytes until they are different from the first bytes of the file, without writing multiple times.
Le mar. 14 févr. 2017 à 03:10, Steve Rowe <sar...@gmail.com> a écrit : > This failure reproduces for me on branch_5_5, but not on master or > branch_6x. > > -- > Steve > www.lucidworks.com > > > On Feb 13, 2017, at 9:03 PM, Apache Jenkins Server < > jenk...@builds.apache.org> wrote: > > > > Build: https://builds.apache.org/job/Lucene-Solr-Tests-5.5/26/ > > > > 1 tests failed. > > FAILED: org.apache.lucene.index.TestAllFilesCheckIndexHeader.test > > > > Error Message: > > file "_h_Lucene50_0.doc" was already written to > > > > Stack Trace: > > java.io.IOException: file "_h_Lucene50_0.doc" was already written to > > at > __randomizedtesting.SeedInfo.seed([4BC507D87C083D63:C3913802D2F4509B]:0) > > at > org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:558) > > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.checkOneFile(TestAllFilesCheckIndexHeader.java:111) > > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.checkIndexHeader(TestAllFilesCheckIndexHeader.java:87) > > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.test(TestAllFilesCheckIndexHeader.java:80) > > 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:1764) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:871) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:907) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:921) > > at > org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49) > > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45) > > at > org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48) > > at > org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64) > > at > org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:367) > > at > com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:809) > > at > com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:460) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:880) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:781) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:816) > > at > com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:827) > > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41) > > at > com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) > > at > com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53) > > at > org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47) > > at > org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64) > > at > org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54) > > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > > at > com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:367) > > at java.lang.Thread.run(Thread.java:745) > > > > > > > > > > Build Log: > > [...truncated 723 lines...] > > [junit4] Suite: org.apache.lucene.index.TestAllFilesCheckIndexHeader > > [junit4] 2> NOTE: reproduce with: ant test > -Dtestcase=TestAllFilesCheckIndexHeader -Dtests.method=test > -Dtests.seed=4BC507D87C083D63 -Dtests.multiplier=2 -Dtests.slow=true > -Dtests.locale=fi -Dtests.timezone=Etc/GMT+4 -Dtests.asserts=true > -Dtests.file.encoding=UTF-8 > > [junit4] ERROR 0.82s J2 | TestAllFilesCheckIndexHeader.test <<< > > [junit4] > Throwable #1: java.io.IOException: file > "_h_Lucene50_0.doc" was already written to > > [junit4] > at > __randomizedtesting.SeedInfo.seed([4BC507D87C083D63:C3913802D2F4509B]:0) > > [junit4] > at > org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:558) > > [junit4] > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.checkOneFile(TestAllFilesCheckIndexHeader.java:111) > > [junit4] > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.checkIndexHeader(TestAllFilesCheckIndexHeader.java:87) > > [junit4] > at > org.apache.lucene.index.TestAllFilesCheckIndexHeader.test(TestAllFilesCheckIndexHeader.java:80) > > [junit4] > at java.lang.Thread.run(Thread.java:745) > > [junit4] 2> NOTE: test params are: codec=Asserting(Lucene54): {}, > docValues:{}, sim=RandomSimilarity(queryNorm=false,coord=yes): {body=IB > LL-DZ(0.3), titleTokenized=DFR I(n)B3(800.0)}, locale=fi, timezone=Etc/GMT+4 > > [junit4] 2> NOTE: Linux 3.13.0-85-generic amd64/Oracle Corporation > 1.7.0_80 (64-bit)/cpus=4,threads=1,free=131735736,total=350224384 > > [junit4] 2> NOTE: All tests run in this JVM: > [TestCachingTokenFilter, TestSpanNearQuery, TestNoDeletionPolicy, > TestNumericRangeQuery32, TestReaderWrapperDVTypeCheck, > TestTimSorterWorstCase, TestAutomatonQuery, TestDocValuesRewriteMethod, > TestMathUtil, TestLazyProxSkipping, TestTransactions, > FuzzyTermOnShortTermsTest, TestBlockPostingsFormat, TestSumDocFreq, > TestUnicodeUtil, TestNumericTokenStream, TestTopDocsMerge, > TestRegexpRandom, TestCharFilter, TestFilterDirectoryReader, TestStressNRT, > TestOmitTf, TestLucene50TermVectorsFormat, TestSpanTermQuery, > TestPrefixQuery, TestBooleanCoord, TestPrefixInBooleanQuery, > TestCompiledAutomaton, Test2BNumericDocValues, TestIndexWriterUnicode, > TestForUtil, TestConcurrentMergeScheduler, TestMultiTermQueryRewrites, > TestSloppyPhraseQuery2, TestFilteredSearch, TestSearchWithThreads, > TestPerFieldPostingsFormat2, TestIndexWriterReader, > TestBooleanQueryVisitSubscorers, TestTermVectorsWriter, TestMaxPosition, > TestAllFilesCheckIndexHeader] > > [junit4] Completed [160/423 (1!)] on J2 in 0.84s, 1 test, 1 error <<< > FAILURES! > > > > [...truncated 848 lines...] > > BUILD FAILED > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/build.xml:750: > The following error occurred while executing this line: > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/build.xml:694: > The following error occurred while executing this line: > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/build.xml:59: > The following error occurred while executing this line: > > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/lucene/build.xml:50: > The following error occurred while executing this line: > > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/lucene/common-build.xml:1477: > The following error occurred while executing this line: > > > /x1/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.5/lucene/common-build.xml:1033: > There were test failures: 423 suites (1 ignored), 3466 tests, 1 error, 49 > ignored (45 assumptions) [seed: 4BC507D87C083D63] > > > > Total time: 7 minutes 28 seconds > > Build step 'Invoke Ant' marked build as failure > > Archiving artifacts > > Recording test results > > Email was triggered for: Failure - Any > > Sending email for trigger: Failure - Any > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > > For additional commands, e-mail: dev-h...@lucene.apache.org > >