File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades
server/src/internalClusterTest/java/org/opensearch/indices/replication
test/framework/src/main/java/org/opensearch/test Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 4040import org .opensearch .common .Booleans ;
4141import org .opensearch .common .io .Streams ;
4242import org .opensearch .common .settings .Settings ;
43+ import org .opensearch .index .codec .CodecService ;
4344import org .opensearch .index .engine .EngineConfig ;
4445import org .opensearch .indices .replication .common .ReplicationType ;
4546import org .opensearch .test .rest .yaml .ObjectPath ;
5354
5455import static org .opensearch .cluster .routing .UnassignedInfo .INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING ;
5556import static org .opensearch .rest .action .search .RestSearchAction .TOTAL_HITS_AS_INT_PARAM ;
56- import static org .opensearch .test .OpenSearchIntegTestCase .CODECS ;
5757
5858/**
5959 * Basic test that indexed documents survive the rolling restart. See
@@ -267,7 +267,7 @@ public void testIndexingWithSegRep() throws Exception {
267267 .put (IndexMetadata .SETTING_REPLICATION_TYPE , ReplicationType .SEGMENT )
268268 .put (
269269 EngineConfig .INDEX_CODEC_SETTING .getKey (),
270- randomFrom (CODECS )
270+ randomFrom (CodecService . DEFAULT_CODEC , CodecService . BEST_COMPRESSION_CODEC , CodecService . LUCENE_DEFAULT_CODEC )
271271 )
272272 .put (INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING .getKey (), "100ms" );
273273 createIndex (indexName , settings .build ());
Original file line number Diff line number Diff line change 5353import org .opensearch .index .SegmentReplicationPerGroupStats ;
5454import org .opensearch .index .SegmentReplicationPressureService ;
5555import org .opensearch .index .SegmentReplicationShardStats ;
56+ import org .opensearch .index .codec .CodecService ;
5657import org .opensearch .index .engine .Engine ;
5758import org .opensearch .index .engine .EngineConfig ;
5859import org .opensearch .index .engine .NRTReplicationReaderManager ;
@@ -200,7 +201,10 @@ public void testReplicationAfterPrimaryRefreshAndFlush() throws Exception {
200201 final String nodeB = internalCluster ().startDataOnlyNode ();
201202 final Settings settings = Settings .builder ()
202203 .put (indexSettings ())
203- .put (EngineConfig .INDEX_CODEC_SETTING .getKey (), randomFrom (CODECS ))
204+ .put (
205+ EngineConfig .INDEX_CODEC_SETTING .getKey (),
206+ randomFrom (CodecService .DEFAULT_CODEC , CodecService .BEST_COMPRESSION_CODEC , CodecService .LUCENE_DEFAULT_CODEC )
207+ )
204208 .build ();
205209 createIndex (INDEX_NAME , settings );
206210 ensureGreen (INDEX_NAME );
Original file line number Diff line number Diff line change @@ -364,14 +364,6 @@ public abstract class OpenSearchIntegTestCase extends OpenSearchTestCase {
364364 private static OpenSearchIntegTestCase INSTANCE = null ; // see @SuiteScope
365365 private static Long SUITE_SEED = null ;
366366
367- public static List <String > CODECS = List .of (
368- CodecService .DEFAULT_CODEC ,
369- CodecService .BEST_COMPRESSION_CODEC ,
370- CodecService .LUCENE_DEFAULT_CODEC ,
371- CodecService .ZSTD_CODEC ,
372- CodecService .ZSTD_NO_DICT_CODEC
373- );
374-
375367 @ BeforeClass
376368 public static void beforeClass () throws Exception {
377369 SUITE_SEED = randomLong ();
@@ -435,7 +427,7 @@ protected void randomIndexTemplate() {
435427 // otherwise, use it, it has assertions and so on that can find bugs.
436428 SuppressCodecs annotation = getClass ().getAnnotation (SuppressCodecs .class );
437429 if (annotation != null && annotation .value ().length == 1 && "*" .equals (annotation .value ()[0 ])) {
438- randomSettingsBuilder .put ("index.codec" , randomFrom (CODECS ));
430+ randomSettingsBuilder .put ("index.codec" , randomFrom (CodecService . DEFAULT_CODEC , CodecService . BEST_COMPRESSION_CODEC ));
439431 } else {
440432 randomSettingsBuilder .put ("index.codec" , CodecService .LUCENE_DEFAULT_CODEC );
441433 }
You can’t perform that action at this time.
0 commit comments