From 9886ab457789ce86fcc6665ec62f14658d26dd50 Mon Sep 17 00:00:00 2001 From: Kartik Ganesh Date: Fri, 1 Apr 2022 14:28:42 -0700 Subject: [PATCH 1/2] Fixing thread leak errors in tests This was occurring due to unused NoOpClient instances that were leftover from refactoring. Since the client was never closed, this caused multiple tests to fail incorrectly. Signed-off-by: Kartik Ganesh --- .../src/test/java/org/opensearch/index/IndexModuleTests.java | 2 -- .../java/org/opensearch/index/shard/IndexShardTestCase.java | 3 --- 2 files changed, 5 deletions(-) diff --git a/server/src/test/java/org/opensearch/index/IndexModuleTests.java b/server/src/test/java/org/opensearch/index/IndexModuleTests.java index db69690f1df00..daa9186dfd8c0 100644 --- a/server/src/test/java/org/opensearch/index/IndexModuleTests.java +++ b/server/src/test/java/org/opensearch/index/IndexModuleTests.java @@ -103,7 +103,6 @@ import org.opensearch.test.ClusterServiceUtils; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.IndexSettingsModule; -import org.opensearch.test.client.NoOpClient; import org.opensearch.test.engine.MockEngineFactory; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; @@ -194,7 +193,6 @@ public void tearDown() throws Exception { } private IndexService newIndexService(IndexModule module) throws IOException { - NoOpClient noOpClient = new NoOpClient(this.getTestName()); return module.newIndexService( CREATE_INDEX, nodeEnvironment, diff --git a/test/framework/src/main/java/org/opensearch/index/shard/IndexShardTestCase.java b/test/framework/src/main/java/org/opensearch/index/shard/IndexShardTestCase.java index f2a95826b8844..8f43bb23db234 100644 --- a/test/framework/src/main/java/org/opensearch/index/shard/IndexShardTestCase.java +++ b/test/framework/src/main/java/org/opensearch/index/shard/IndexShardTestCase.java @@ -100,7 +100,6 @@ import org.opensearch.snapshots.Snapshot; import org.opensearch.test.DummyShardLock; import org.opensearch.test.OpenSearchTestCase; -import org.opensearch.test.client.NoOpClient; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; @@ -459,8 +458,6 @@ protected IndexShard newShard( Collections.emptyList(), clusterSettings ); - // No-op checkpoint publisher for backwards compatibliity - NoOpClient noOpClient = new NoOpClient(this.getTestName()); indexShard = new IndexShard( routing, indexSettings, From 030a5698c091bc51cf69843063bd9a54570a9626 Mon Sep 17 00:00:00 2001 From: Suraj Singh <79435743+dreamer-89@users.noreply.github.com> Date: Wed, 30 Mar 2022 21:33:17 -0700 Subject: [PATCH 2/2] Add 1.3.2 to main causing gradle check failures (#2679) Signed-off-by: Suraj Singh --- .ci/bwcVersions | 1 + server/src/main/java/org/opensearch/Version.java | 1 + 2 files changed, 2 insertions(+) diff --git a/.ci/bwcVersions b/.ci/bwcVersions index ddc36af48d674..de840b910ada2 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -38,4 +38,5 @@ BWC_VERSION: - "1.2.5" - "1.3.0" - "1.3.1" + - "1.3.2" - "1.4.0" diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index f74e529c442bb..eb6a80d37d83d 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -80,6 +80,7 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_1_2_5 = new Version(1020599, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_1_3_0 = new Version(1030099, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_1_3_1 = new Version(1030199, org.apache.lucene.util.Version.LUCENE_8_10_1); + public static final Version V_1_3_2 = new Version(1030299, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_1_4_0 = new Version(1040099, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_2_0_0 = new Version(2000099, org.apache.lucene.util.Version.LUCENE_9_1_0); public static final Version CURRENT = V_2_0_0;