mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
03984ec124
commit
94a47f4415
|
@ -24,10 +24,10 @@ import org.apache.lucene.analysis.TokenStream;
|
||||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||||
import org.apache.lucene.document.Document;
|
import org.apache.lucene.document.Document;
|
||||||
import org.apache.lucene.document.Field;
|
import org.apache.lucene.document.Field;
|
||||||
|
import org.apache.lucene.index.codecs.CodecProvider;
|
||||||
import org.apache.lucene.store.MockDirectoryWrapper;
|
import org.apache.lucene.store.MockDirectoryWrapper;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.lucene.util._TestUtil;
|
import org.apache.lucene.util._TestUtil;
|
||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,8 +35,13 @@ import org.junit.Ignore;
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public class Test2BPostings extends LuceneTestCase {
|
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 {
|
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"));
|
MockDirectoryWrapper dir = newFSDirectory(_TestUtil.getTempDir("2BPostings"));
|
||||||
dir.setThrottling(MockDirectoryWrapper.Throttling.NEVER);
|
dir.setThrottling(MockDirectoryWrapper.Throttling.NEVER);
|
||||||
dir.setCheckIndexOnClose(false); // don't double-checkindex
|
dir.setCheckIndexOnClose(false); // don't double-checkindex
|
||||||
|
|
Loading…
Reference in New Issue