Skip to content

Commit e1aad1f

Browse files
committed
Copy ES819TSDBDocValuesConsume into tests for version 0 bwc tests
1 parent 97e4ff3 commit e1aad1f

File tree

4 files changed

+1036
-1
lines changed

4 files changed

+1036
-1
lines changed

server/src/main/java/org/elasticsearch/index/codec/tsdb/es819/ES819TSDBDocValuesFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static boolean getOptimizedMergeEnabledDefault() {
118118

119119
final int skipIndexIntervalSize;
120120
final int minDocsPerOrdinalForRangeEncoding;
121-
private final boolean enableOptimizedMerge;
121+
final boolean enableOptimizedMerge;
122122

123123
/** Default constructor. */
124124
public ES819TSDBDocValuesFormat() {

server/src/test/java/org/elasticsearch/index/codec/tsdb/TsdbDocValueBwcTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import java.util.function.IntSupplier;
5454

5555
import static org.hamcrest.Matchers.equalTo;
56+
import static org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests.TestES819TSDBDocValuesFormatVersion0;
5657

5758
public class TsdbDocValueBwcTests extends ESTestCase {
5859

@@ -62,6 +63,13 @@ public void testMixedIndex() throws Exception {
6263
testMixedIndex(oldCodec, newCodec);
6364
}
6465

66+
// TODO update Current to Version1 once version is incremented
67+
public void testMixedIndexDocValueVersion0ToCurrent() throws Exception {
68+
var oldCodec = TestUtil.alwaysDocValuesFormat(new TestES819TSDBDocValuesFormatVersion0());
69+
var newCodec = TestUtil.alwaysDocValuesFormat(new ES819TSDBDocValuesFormat());
70+
testMixedIndex(oldCodec, newCodec);
71+
}
72+
6573
public void testMixedIndex816To900Lucene101() throws Exception {
6674
var oldCodec = new Elasticsearch816Codec() {
6775

0 commit comments

Comments
 (0)