mirror of https://github.com/apache/lucene.git
enable @Ignored (no nocommit??????) test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1430967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
42113ec733
commit
16b7d33dc8
|
@ -38,8 +38,12 @@ class Lucene41SimpleDocValuesConsumer extends SimpleDVConsumer {
|
|||
Lucene41SimpleDocValuesConsumer(SegmentWriteState state) throws IOException {
|
||||
String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, "dvd");
|
||||
data = state.directory.createOutput(dataName, state.context);
|
||||
CodecUtil.writeHeader(data, Lucene41SimpleDocValuesFormat.DATA_CODEC,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_CURRENT);
|
||||
String metaName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, "dvm");
|
||||
meta = state.directory.createOutput(metaName, state.context);
|
||||
CodecUtil.writeHeader(meta, Lucene41SimpleDocValuesFormat.METADATA_CODEC,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_CURRENT);
|
||||
maxDoc = state.segmentInfo.getDocCount();
|
||||
}
|
||||
|
||||
|
|
|
@ -52,4 +52,9 @@ public class Lucene41SimpleDocValuesFormat extends SimpleDocValuesFormat {
|
|||
public SimpleDVProducer fieldsProducer(SegmentReadState state) throws IOException {
|
||||
return new Lucene41SimpleDocValuesProducer(state);
|
||||
}
|
||||
|
||||
static final String DATA_CODEC = "Lucene41DocValuesData";
|
||||
static final String METADATA_CODEC = "Lucene41DocValuesMetadata";
|
||||
static final int VERSION_START = 0;
|
||||
static final int VERSION_CURRENT = VERSION_START;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.lucene.codecs.CodecUtil;
|
||||
import org.apache.lucene.codecs.SimpleDVProducer;
|
||||
import org.apache.lucene.index.BinaryDocValues;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
|
@ -48,6 +49,9 @@ class Lucene41SimpleDocValuesProducer extends SimpleDVProducer {
|
|||
IndexInput in = state.directory.openInput(metaName, state.context);
|
||||
boolean success = false;
|
||||
try {
|
||||
CodecUtil.checkHeader(in, Lucene41SimpleDocValuesFormat.METADATA_CODEC,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_START,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_START);
|
||||
numerics = new HashMap<Integer,NumericEntry>();
|
||||
ords = new HashMap<Integer,NumericEntry>();
|
||||
binaries = new HashMap<Integer,BinaryEntry>();
|
||||
|
@ -63,6 +67,9 @@ class Lucene41SimpleDocValuesProducer extends SimpleDVProducer {
|
|||
|
||||
String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, "dvd");
|
||||
data = state.directory.openInput(dataName, state.context);
|
||||
CodecUtil.checkHeader(data, Lucene41SimpleDocValuesFormat.DATA_CODEC,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_START,
|
||||
Lucene41SimpleDocValuesFormat.VERSION_START);
|
||||
}
|
||||
|
||||
private void readFields(IndexInput meta, FieldInfos infos) throws IOException {
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.junit.Ignore;
|
|||
/**
|
||||
* Test that a plain default puts codec headers in all files.
|
||||
*/
|
||||
@Ignore("re-enable once Lucene41 doesn't secretly wrap SimpleText anymore")
|
||||
public class TestAllFilesHaveCodecHeader extends LuceneTestCase {
|
||||
public void test() throws Exception {
|
||||
Directory dir = newDirectory();
|
||||
|
|
Loading…
Reference in New Issue