You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/08/25 21:29:50 UTC
svn commit: r1517373 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/test-framework/
lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
Author: rmuir
Date: Sun Aug 25 19:29:50 2013
New Revision: 1517373
URL: http://svn.apache.org/r1517373
Log:
fix test bug
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
Modified: lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java?rev=1517373&r1=1517372&r2=1517373&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java Sun Aug 25 19:29:50 2013
@@ -1092,6 +1092,11 @@ public abstract class BaseDocValuesForma
public void testRandomSortedBytes() throws IOException {
Directory dir = newDirectory();
IndexWriterConfig cfg = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
+ if (!defaultCodecSupportsDocsWithField()) {
+ // if the codec doesnt support missing, we expect missing to be mapped to byte[]
+ // by the impersonator, but we have to give it a chance to merge them to this
+ cfg.setMergePolicy(newLogMergePolicy());
+ }
RandomIndexWriter w = new RandomIndexWriter(random(), dir, cfg);
int numDocs = atLeast(100);
BytesRefHash hash = new BytesRefHash();
@@ -1123,6 +1128,11 @@ public abstract class BaseDocValuesForma
if (rarely()) {
w.commit();
}
+ if (!defaultCodecSupportsDocsWithField()) {
+ // if the codec doesnt support missing, we expect missing to be mapped to byte[]
+ // by the impersonator, but we have to give it a chance to merge them to this
+ w.forceMerge(1);
+ }
for (int i = 0; i < numDocs; i++) {
Document doc = new Document();
String id = "" + i + numDocs;