You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2014/04/24 18:26:47 UTC
RE: svn commit: r1589782 -
/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/inde
x/TestTerms.java
: Why not use the @SuppressCodes annotation?
mike mentioned this in his reply to the jenkins failure...
>> I committed a fix, disabling Lucene3x for that test case. I didn't
>> use @SuppressCodecs because the other tests should work fine w/
>> Lucene3x.
..perhaps putting this in the test as a comment owuld be useful?
:
: -----
: Uwe Schindler
: H.-H.-Meier-Allee 63, D-28213 Bremen
: http://www.thetaphi.de
: eMail: uwe@thetaphi.de
:
:
: > -----Original Message-----
: > From: mikemccand@apache.org [mailto:mikemccand@apache.org]
: > Sent: Thursday, April 24, 2014 6:08 PM
: > To: commits@lucene.apache.org
: > Subject: svn commit: r1589782 -
: > /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/
: > index/TestTerms.java
: >
: > Author: mikemccand
: > Date: Thu Apr 24 16:07:30 2014
: > New Revision: 1589782
: >
: > URL: http://svn.apache.org/r1589782
: > Log:
: > LUCENE-5610: don't use Lucene3x codec (the test writes arbitrary binary
: > terms)
: >
: > Modified:
: >
: > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
: > ndex/TestTerms.java
: >
: > Modified:
: > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
: > ndex/TestTerms.java
: > URL:
: > http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/cor
: > e/src/test/org/apache/lucene/index/TestTerms.java?rev=1589782&r1=1589
: > 781&r2=1589782&view=diff
: > ==========================================================
: > ====================
: > ---
: > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
: > ndex/TestTerms.java (original)
: > +++
: > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene
: > +++ /index/TestTerms.java Thu Apr 24 16:07:30 2014
: > @@ -20,6 +20,8 @@ package org.apache.lucene.index; import java.util.*;
: >
: > import org.apache.lucene.analysis.CannedBinaryTokenStream;
: > +import org.apache.lucene.codecs.Codec;
: > +import org.apache.lucene.codecs.lucene3x.Lucene3xCodec;
: > import org.apache.lucene.document.Document;
: > import org.apache.lucene.document.DoubleField;
: > import org.apache.lucene.document.Field; @@ -51,6 +53,7 @@ public class
: > TestTerms extends LuceneTes
: > }
: >
: > public void testTermMinMaxRandom() throws Exception {
: > + assumeFalse("test writes binary terms", Codec.getDefault()
: > + instanceof Lucene3xCodec);
: > Directory dir = newDirectory();
: > RandomIndexWriter w = new RandomIndexWriter(random(), dir);
: > int numDocs = atLeast(100);
:
:
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
: For additional commands, e-mail: dev-help@lucene.apache.org
:
:
-Hoss
http://www.lucidworks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
RE: svn commit: r1589782 - /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/inde x/TestTerms.java
Posted by Uwe Schindler <uw...@thetaphi.de>.
Another possibility that works is to move this test to a separate class, annotated with SuppressCodecs (if it does not depend on indexes created in beforeclass).
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Robert Muir [mailto:rcmuir@gmail.com]
> Sent: Thursday, April 24, 2014 8:41 PM
> To: dev@lucene.apache.org
> Subject: Re: svn commit: r1589782 -
> /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/
> inde x/TestTerms.java
>
> On Thu, Apr 24, 2014 at 12:31 PM, Michael McCandless
> <lu...@mikemccandless.com> wrote:
> > Yeah, I didn't want to disable the full test, just that one method,
> > because I want Terms.getMin/Max testing for Lucene3x too.
> >
> > Would be nice if we could @SuppressCodecs for just one method ...
>
> Thats impossible: many tests create their indexes in @BeforeClass, so codec
> selection really must be a per-class thing.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1589782 - /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/inde
x/TestTerms.java
Posted by Robert Muir <rc...@gmail.com>.
On Thu, Apr 24, 2014 at 12:31 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Yeah, I didn't want to disable the full test, just that one method,
> because I want Terms.getMin/Max testing for Lucene3x too.
>
> Would be nice if we could @SuppressCodecs for just one method ...
Thats impossible: many tests create their indexes in @BeforeClass, so
codec selection really must be a per-class thing.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1589782 - /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/inde
x/TestTerms.java
Posted by Michael McCandless <lu...@mikemccandless.com>.
Yeah, I didn't want to disable the full test, just that one method,
because I want Terms.getMin/Max testing for Lucene3x too.
Would be nice if we could @SuppressCodecs for just one method ...
I'll add a comment.
Mike McCandless
http://blog.mikemccandless.com
On Thu, Apr 24, 2014 at 12:26 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : Why not use the @SuppressCodes annotation?
>
> mike mentioned this in his reply to the jenkins failure...
>
>>> I committed a fix, disabling Lucene3x for that test case. I didn't
>>> use @SuppressCodecs because the other tests should work fine w/
>>> Lucene3x.
>
> ..perhaps putting this in the test as a comment owuld be useful?
>
>
> :
> : -----
> : Uwe Schindler
> : H.-H.-Meier-Allee 63, D-28213 Bremen
> : http://www.thetaphi.de
> : eMail: uwe@thetaphi.de
> :
> :
> : > -----Original Message-----
> : > From: mikemccand@apache.org [mailto:mikemccand@apache.org]
> : > Sent: Thursday, April 24, 2014 6:08 PM
> : > To: commits@lucene.apache.org
> : > Subject: svn commit: r1589782 -
> : > /lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/
> : > index/TestTerms.java
> : >
> : > Author: mikemccand
> : > Date: Thu Apr 24 16:07:30 2014
> : > New Revision: 1589782
> : >
> : > URL: http://svn.apache.org/r1589782
> : > Log:
> : > LUCENE-5610: don't use Lucene3x codec (the test writes arbitrary binary
> : > terms)
> : >
> : > Modified:
> : >
> : > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
> : > ndex/TestTerms.java
> : >
> : > Modified:
> : > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
> : > ndex/TestTerms.java
> : > URL:
> : > http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/cor
> : > e/src/test/org/apache/lucene/index/TestTerms.java?rev=1589782&r1=1589
> : > 781&r2=1589782&view=diff
> : > ==========================================================
> : > ====================
> : > ---
> : > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/i
> : > ndex/TestTerms.java (original)
> : > +++
> : > lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene
> : > +++ /index/TestTerms.java Thu Apr 24 16:07:30 2014
> : > @@ -20,6 +20,8 @@ package org.apache.lucene.index; import java.util.*;
> : >
> : > import org.apache.lucene.analysis.CannedBinaryTokenStream;
> : > +import org.apache.lucene.codecs.Codec;
> : > +import org.apache.lucene.codecs.lucene3x.Lucene3xCodec;
> : > import org.apache.lucene.document.Document;
> : > import org.apache.lucene.document.DoubleField;
> : > import org.apache.lucene.document.Field; @@ -51,6 +53,7 @@ public class
> : > TestTerms extends LuceneTes
> : > }
> : >
> : > public void testTermMinMaxRandom() throws Exception {
> : > + assumeFalse("test writes binary terms", Codec.getDefault()
> : > + instanceof Lucene3xCodec);
> : > Directory dir = newDirectory();
> : > RandomIndexWriter w = new RandomIndexWriter(random(), dir);
> : > int numDocs = atLeast(100);
> :
> :
> :
> : ---------------------------------------------------------------------
> : To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> : For additional commands, e-mail: dev-help@lucene.apache.org
> :
> :
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org