From 6f33bd9b468d6dd559aa1d8852e7a7ad8c0b2e78 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 7 Jun 2023 12:08:00 -0700 Subject: [PATCH] Remove older lucene test Signed-off-by: Suraj Singh --- distribution/build.gradle | 2 +- gradle/runtime-jdk-provision.gradle | 2 +- .../indices/replication/SegmentReplicationIT.java | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 631813aadd615..2378ed833ead7 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -283,7 +283,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { (platform == 'linux' || platform == 'darwin' ? ['x64', 'aarch64', 's390x', 'ppc64le'] : ['x64']).each { architecture -> "bundled_${platform}_${architecture}" { it.platform = platform - it.version = VersionProperties.getBundledJdk(platform) + it.version = VersionProperties.getBundledJdk(platform, architecture) it.vendor = VersionProperties.bundledJdkVendor it.architecture = architecture } diff --git a/gradle/runtime-jdk-provision.gradle b/gradle/runtime-jdk-provision.gradle index cb4bb834f89c9..6bff164633c25 100644 --- a/gradle/runtime-jdk-provision.gradle +++ b/gradle/runtime-jdk-provision.gradle @@ -32,7 +32,7 @@ if (BuildParams.getIsRuntimeJavaHomeSet()) { jdks { provisioned_runtime { vendor = VersionProperties.bundledJdkVendor - version = VersionProperties.getBundledJdk(OS.current().name().toLowerCase()) + version = VersionProperties.getBundledJdk(OS.current().name().toLowerCase(), Architecture.current().name().toLowerCase()) platform = OS.current().name().toLowerCase() architecture = Architecture.current().name().toLowerCase() } diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationIT.java index 16375cb25be7f..1daac295630ff 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationIT.java @@ -42,7 +42,6 @@ import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.allocation.command.CancelAllocationCommand; -import org.opensearch.common.io.PathUtils; import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.lucene.index.OpenSearchDirectoryReader; import org.opensearch.common.settings.Settings; @@ -53,7 +52,9 @@ import org.opensearch.index.SegmentReplicationPerGroupStats; import org.opensearch.index.SegmentReplicationPressureService; import org.opensearch.index.SegmentReplicationShardStats; +import org.opensearch.index.codec.CodecService; import org.opensearch.index.engine.Engine; +import org.opensearch.index.engine.EngineConfig; import org.opensearch.index.engine.NRTReplicationReaderManager; import org.opensearch.index.shard.IndexShard; import org.opensearch.index.shard.ShardId; @@ -74,7 +75,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.concurrent.CountDownLatch; @@ -192,7 +192,14 @@ public void testCancelPrimaryAllocation() throws Exception { public void testReplicationAfterPrimaryRefreshAndFlush() throws Exception { final String nodeA = internalCluster().startNode(); final String nodeB = internalCluster().startNode(); - createIndex(INDEX_NAME); + final Settings settings = Settings.builder() + .put(indexSettings()) + .put( + EngineConfig.INDEX_CODEC_SETTING.getKey(), + randomFrom(CodecService.DEFAULT_CODEC, CodecService.BEST_COMPRESSION_CODEC, CodecService.LUCENE_DEFAULT_CODEC) + ) + .build(); + createIndex(INDEX_NAME, settings); ensureGreen(INDEX_NAME); final int initialDocCount = scaledRandomIntBetween(0, 200);