From 61b9c8138c4a45e6a7ce533f8137d18569804543 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Mon, 1 May 2023 14:47:11 -0400 Subject: [PATCH] OpenJDK Update (April 2023 Patch releases) Signed-off-by: Andriy Redko --- CHANGELOG.md | 3 ++- .../java/org/opensearch/gradle/test/DistroTestPlugin.java | 4 ++-- buildSrc/version.properties | 2 +- .../opensearch/discovery/ClusterManagerDisruptionIT.java | 4 ++++ .../discovery/StableClusterManagerDisruptionIT.java | 4 ++++ .../opensearch/test/disruption/LongGCDisruptionTests.java | 8 ++++++++ 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffe72c402db8f..ebf559384a003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `org.apache.commons:commons-compress` from 1.22 to 1.23.0 (#7462) - Bump Apache Lucene to 9.6.0 ([#7505](https://github.com/opensearch-project/OpenSearch/pull/7505)) - Bump `com.google.cloud:google-cloud-core-http` from 1.93.3 to 2.17.0 (#7488) +- OpenJDK Update (April 2023 Patch releases) ([#7344](https://github.com/opensearch-project/OpenSearch/pull/7344) ### Changed - Enable `./gradlew build` on MacOS by disabling bcw tests ([#7303](https://github.com/opensearch-project/OpenSearch/pull/7303)) @@ -120,4 +121,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Security [Unreleased 3.0]: https://github.com/opensearch-project/OpenSearch/compare/2.x...HEAD -[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.7...2.x \ No newline at end of file +[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.7...2.x diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java index 57bb524bcf607..7e0dc72cb9108 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java @@ -75,9 +75,9 @@ import java.util.stream.Stream; public class DistroTestPlugin implements Plugin { - private static final String SYSTEM_JDK_VERSION = "11.0.18+10"; + private static final String SYSTEM_JDK_VERSION = "11.0.19+7"; private static final String SYSTEM_JDK_VENDOR = "adoptium"; - private static final String GRADLE_JDK_VERSION = "17.0.6+10"; + private static final String GRADLE_JDK_VERSION = "17.0.7+7"; private static final String GRADLE_JDK_VENDOR = "adoptium"; // all distributions used by distro tests. this is temporary until tests are per distribution diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 195050939b11d..fe613f8e789e4 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -2,7 +2,7 @@ opensearch = 3.0.0 lucene = 9.6.0 bundled_jdk_vendor = adoptium -bundled_jdk = 19.0.2+7 +bundled_jdk = 20.0.1+9 # optional dependencies diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java index 2803fa262a216..f938996929795 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java @@ -57,7 +57,9 @@ import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.not; +import static org.junit.Assume.assumeThat; /** * Tests relating to the loss of the cluster-manager. @@ -69,6 +71,8 @@ public class ClusterManagerDisruptionIT extends AbstractDisruptionTestCase { * Test that cluster recovers from a long GC on cluster-manager that causes other nodes to elect a new one */ public void testClusterManagerNodeGCs() throws Exception { + assumeThat("Thread::resume / Thread::suspend are not supported anymore", Runtime.version(), lessThan(Runtime.Version.parse("20"))); + List nodes = startCluster(3); String oldClusterManagerNode = internalCluster().getClusterManagerName(); diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/StableClusterManagerDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/StableClusterManagerDisruptionIT.java index ffbaa35f61b72..24bb414bb8d33 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/StableClusterManagerDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/StableClusterManagerDisruptionIT.java @@ -71,6 +71,8 @@ import static java.util.Collections.singleton; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.lessThan; +import static org.junit.Assume.assumeThat; /** * Tests relating to the loss of the cluster-manager, but which work with the default fault detection settings which are rather lenient and will @@ -195,6 +197,8 @@ private void testFollowerCheckerAfterClusterManagerReelection(NetworkLinkDisrupt * following another elected cluster-manager node. These nodes should reject this cluster state and prevent them from following the stale cluster-manager. */ public void testStaleClusterManagerNotHijackingMajority() throws Exception { + assumeThat("Thread::resume / Thread::suspend are not supported anymore", Runtime.version(), lessThan(Runtime.Version.parse("20"))); + final List nodes = internalCluster().startNodes( 3, Settings.builder() diff --git a/test/framework/src/test/java/org/opensearch/test/disruption/LongGCDisruptionTests.java b/test/framework/src/test/java/org/opensearch/test/disruption/LongGCDisruptionTests.java index f545577ec5cc4..384297c9033af 100644 --- a/test/framework/src/test/java/org/opensearch/test/disruption/LongGCDisruptionTests.java +++ b/test/framework/src/test/java/org/opensearch/test/disruption/LongGCDisruptionTests.java @@ -45,9 +45,11 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Pattern; +import static org.junit.Assume.assumeThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.lessThan; public class LongGCDisruptionTests extends OpenSearchTestCase { @@ -65,6 +67,8 @@ public void executeLocked(Runnable r) { } public void testBlockingTimeout() throws Exception { + assumeThat("Thread::resume / Thread::suspend are not supported anymore", Runtime.version(), lessThan(Runtime.Version.parse("20"))); + final String nodeName = "test_node"; LongGCDisruption disruption = new LongGCDisruption(random(), nodeName) { @Override @@ -125,6 +129,8 @@ protected long getSuspendingTimeoutInMillis() { * but does keep retrying until all threads can be safely paused */ public void testNotBlockingUnsafeStackTraces() throws Exception { + assumeThat("Thread::resume / Thread::suspend are not supported anymore", Runtime.version(), lessThan(Runtime.Version.parse("20"))); + final String nodeName = "test_node"; LongGCDisruption disruption = new LongGCDisruption(random(), nodeName) { @Override @@ -179,6 +185,8 @@ protected Pattern[] getUnsafeClasses() { } public void testBlockDetection() throws Exception { + assumeThat("Thread::resume / Thread::suspend are not supported anymore", Runtime.version(), lessThan(Runtime.Version.parse("20"))); + final String disruptedNodeName = "disrupted_node"; final String blockedNodeName = "blocked_node"; CountDownLatch waitForBlockDetectionResult = new CountDownLatch(1);