From 94a47f44159a38f237bd57fad811aaf20ef219bc Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 11 Jul 2011 18:05:50 +0000 Subject: [PATCH] enable Test2BPostings only @Nightly and not with Memory nor SimpleText codec git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1145263 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/index/Test2BPostings.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lucene/src/test/org/apache/lucene/index/Test2BPostings.java b/lucene/src/test/org/apache/lucene/index/Test2BPostings.java index 82517c04dda..3f919cb5574 100644 --- a/lucene/src/test/org/apache/lucene/index/Test2BPostings.java +++ b/lucene/src/test/org/apache/lucene/index/Test2BPostings.java @@ -24,10 +24,10 @@ import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; +import org.apache.lucene.index.codecs.CodecProvider; import org.apache.lucene.store.MockDirectoryWrapper; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; - import org.junit.Ignore; /** @@ -35,8 +35,13 @@ import org.junit.Ignore; * @lucene.experimental */ public class Test2BPostings extends LuceneTestCase { - @Ignore("Must run with large (14 GB) java heap, and not Memory nor SimpleText codec!") + + @Nightly public void test() throws Exception { + + assumeFalse("This test cannot run with Memory codec", CodecProvider.getDefault().getFieldCodec("field").equals("Memory")); + assumeFalse("This test is super-slow and very disk-space-consuming with SimpleText codec", CodecProvider.getDefault().getFieldCodec("field").equals("SimpleText")); + MockDirectoryWrapper dir = newFSDirectory(_TestUtil.getTempDir("2BPostings")); dir.setThrottling(MockDirectoryWrapper.Throttling.NEVER); dir.setCheckIndexOnClose(false); // don't double-checkindex