> Thanks Dawid! So my take-away is that this is just pilot error on my part, > not something intrinsic to the code.
I don't know enough about the code to say for sure, but to me that FaultyIndexInput's count field should be reset before each test (shouldn't propagate from test to test, effectively making each test rely on the number of tests before it). As for the exception itself, I've no idea -- didn't look at the code; I think it may be assuming only one iteration. Dawid > > Erick > > > On Sun, Aug 31, 2014 at 12:46 PM, Dawid Weiss <dawid.we...@cs.put.poznan.pl> > wrote: >> >> It's because the exception is triggered in a static class >> FaultyIndexInput (initialized in a static context >> TestFieldsReader#beforeClass). When you ask for -Dtests.iters, only >> the tests (methods) are duplicated, the static context remains the >> same. So the "count" variable in FaultyIndexInput is actually >> propagated from test to test and each repetition is not really atomic/ >> isolated from others (search for one of recent e-mail to Ryan, it >> contains a deeper information on why and how this works). >> >> You can repeat the failure if you repeat exactly the same seed for >> each repetition (including test methods): >> >> ant test -Dtestcase=TestFieldsReader >> -Dtests.seed=DFB0B84C4D087DFD:1DE75618D1B7C867 -Dtests.slow=true >> -Dtests.locale=sr_ME -Dtests.timezone=Asia/Kashgar >> -Dtests.file.encoding=UTF-8 -Dtests.iters=10 >> >> This yields: >> >> Tests with failures: >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#1 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#2 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#3 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#4 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#5 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#6 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#7 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#8 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> - org.apache.lucene.index.TestFieldsReader.testExceptions {#9 >> seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} >> >> Note I included per-method seed in the -Dtests.seed. Also, #0 >> iteration *does pass*; the remaining ones fail because of what I said >> above. >> >> Dawid >> >> On Sun, Aug 31, 2014 at 6:20 AM, Erick Erickson <erickerick...@gmail.com> >> wrote: >> > I'm seeing the fairly easily-reproducible error below on trunk. >> > Unfortunately it doesn't reproduce with the seed. I'm wondering if >> > anyone >> > has an inkling what's going on here? >> > >> > I did manage to notice that I screwed up the command I was _intending_ >> > and >> > actually issued the command below, although I have a hard time imagining >> > that's the problem, unless it's something like running tests.iters on >> > the >> > full suite makes this happen. No wonder -Dtests.iters=100 didn't >> > finish... >> > Siiigggghhhh. >> > >> > ant -Dtestcasae=TestDistributedSearch -Dtests.iters=10 test >> > >> > Note I spelled 'testcase' as 'testcasae'... >> > >> > >> > Stack trace: >> > >> > [junit4] Suite: org.apache.lucene.index.TestFieldsReader >> > >> > [junit4] 2> NOTE: reproduce with: ant test >> > -Dtestcase=TestFieldsReader >> > -Dtests.method=testExceptions -Dtests.seed=DFB0B84C4D087DFD >> > -Dtests.slow=true -Dtests.locale=sr_ME -Dtests.timezone=Asia/Kashgar >> > -Dtests.file.encoding=UTF-8 >> > >> > [junit4] ERROR 0.10s J2 | TestFieldsReader.testExceptions {#1 >> > seed=[DFB0B84C4D087DFD:1DE75618D1B7C867]} <<< >> > >> > [junit4] > Throwable #1: java.io.IOException: Simulated network >> > outage >> > >> > [junit4] > at >> > __randomizedtesting.SeedInfo.seed([DFB0B84C4D087DFD:1DE75618D1B7C867]:0) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.TestFieldsReader$FaultyIndexInput.simOutage(TestFieldsReader.java:156) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.TestFieldsReader$FaultyIndexInput.readInternal(TestFieldsReader.java:161) >> > >> > [junit4] > at >> > >> > org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:342) >> > >> > [junit4] > at >> > >> > org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:140) >> > >> > [junit4] > at >> > >> > org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:116) >> > >> > [junit4] > at >> > >> > org.apache.lucene.store.BufferedChecksumIndexInput.readBytes(BufferedChecksumIndexInput.java:49) >> > >> > [junit4] > at >> > org.apache.lucene.store.DataInput.readString(DataInput.java:234) >> > >> > [junit4] > at >> > >> > org.apache.lucene.store.DataInput.readStringStringMap(DataInput.java:263) >> > >> > [junit4] > at >> > >> > org.apache.lucene.codecs.lucene46.Lucene46FieldInfosReader.read(Lucene46FieldInfosReader.java:93) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.SegmentReader.readFieldInfos(SegmentReader.java:216) >> > >> > [junit4] > at >> > org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:97) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:59) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:795) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:50) >> > >> > [junit4] > at >> > org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:64) >> > >> > [junit4] > at >> > >> > org.apache.lucene.index.TestFieldsReader.testExceptions(TestFieldsReader.java:209) >> > >> > [junit4] > at java.lang.Thread.run(Thread.java:745) >> > >> > [junit4] 2> NOTE: reproduce with: ant test >> > -Dtestcase=TestFieldsReader >> > -Dtests.method=testExceptions -Dtests.seed=DFB0B84C4D087DFD >> > -Dtests.slow=true -Dtests.locale=sr_ME -Dtests.timezone=Asia/Kashgar >> > -Dtests.file.encoding=UTF-8 >> > [junit4] ERROR 0.13s J2 | TestFieldsReader.testExceptions {#2 >> > seed=[DFB0B84C4D087DFD:930EC0C4807380AC]} <<< >> > [junit4] > Throwable #1: java.io.IOException: Simulated network >> > outage >> > >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org