Here the patch to fix the test bug, it's really a test bug - found thanks to Java 5. It was even wrong to use length(), correct would be size() for both and only use the minimum of both as allocation strategy may not be equal.
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: Uwe Schindler [mailto:[email protected]] > Sent: Friday, June 24, 2011 6:06 PM > To: [email protected] > Subject: RE: [VOTE] release 3.3 > > OK, the bug is not a Java 5 bug, its just a different behavior in the BitSet > impl > between java 5 and java 6. > > Java 5's BitSet impl allocates for new BitSet(0) always at least one word, so > size() differs from OpenBitSet. This makes the test fail. > > The fix is to code the test correctly by using Math.min(BitSet.length(), > OpenBitSet.size()) as upper limit and not assume the allocation strategy of > both bitsets is identical. > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: [email protected] > > > > -----Original Message----- > > From: Uwe Schindler [mailto:[email protected]] > > Sent: Friday, June 24, 2011 5:33 PM > > To: [email protected] > > Subject: RE: [VOTE] release 3.3 > > > > The bug is *not* fixed by replacing Long.numberOfLeadingZeros(word) > > with BitUtils.nlz(word). > > > > So this is really strange. Also happens with -Xbatch. > > > > ----- > > Uwe Schindler > > H.-H.-Meier-Allee 63, D-28213 Bremen > > http://www.thetaphi.de > > eMail: [email protected] > > > > > > > -----Original Message----- > > > From: Uwe Schindler [mailto:[email protected]] > > > Sent: Friday, June 24, 2011 5:20 PM > > > To: [email protected] > > > Subject: RE: [VOTE] release 3.3 > > > > > > I assume the problem is the intrinsic, I will replace by the own > > > hacker's delight impl (like we do everywhere else in OpenBitSet, why > > > did we use the platform method here?) and try again.... > > > > > > Uwe > > > > > > ----- > > > Uwe Schindler > > > H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de > > > eMail: [email protected] > > > > > > > > > > -----Original Message----- > > > > From: Robert Muir [mailto:[email protected]] > > > > Sent: Friday, June 24, 2011 5:07 PM > > > > To: [email protected] > > > > Subject: Re: [VOTE] release 3.3 > > > > > > > > Just some more info: i took away the seed and used -Dtests.iter=100 > > > > on this > > > > test: > > > > > > > > JAVA5: > > > > [junit] Testsuite: org.apache.lucene.util.TestOpenBitSet > > > > [junit] Tests run: 400, Failures: 0, Errors: 23, Time elapsed: > > > > 21.793 sec > > > > > > > > JAVA6: > > > > junit-sequential: > > > > [junit] Testsuite: org.apache.lucene.util.TestOpenBitSet > > > > [junit] Tests run: 400, Failures: 0, Errors: 0, Time elapsed: > > > > 19.719 sec > > > > > > > > so this test fails 23% of the time on java5. > > > > > > > > The reason we never caught it, is that java5 is unmaintained and we > > > > cannot even test it in hudson... aka we cannot support this monster > > > anymore!!!! > > > > > > > > On Fri, Jun 24, 2011 at 11:02 AM, Robert Muir <[email protected]> > > wrote: > > > > > On Fri, Jun 24, 2011 at 10:54 AM, Uwe Schindler <[email protected]> > > > > wrote: > > > > >> The OpenBitSet test is in all cases serious (vs. the skiplist > > > > >> test is a test bug, > > > > that true). > > > > >> > > > > >> The AIOOBE is caused inside OpenBitSet and that should never ever > > > > happen, even if you use it incorrectly! > > > > > > > > > > Its not clear that its that serious, it only fails with java 5 for > > > > > me (not java 6) :) > > > > > > > > > > Looks like a bug in java 5... > > > > > > > > > > > > > -------------------------------------------------------------------- > > > > - To unsubscribe, e-mail: [email protected] For > > > > additional commands, e-mail: [email protected] > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] For > > > additional commands, e-mail: [email protected] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] For additional > > commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected]
TestOpenBitSet.patch
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
