diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java index 941400f7ce489..ad550de9a1d4f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java @@ -226,6 +226,7 @@ private void testFollowerCheckerAfterMasterReelection(NetworkLinkDisruptionType * following another elected master node. These nodes should reject this cluster state and prevent them from following the stale master. */ public void testStaleMasterNotHijackingMajority() throws Exception { + assumeFalse("jdk20 removed thread suspend/resume", Runtime.version().feature() >= 20); final List nodes = internalCluster().startNodes( 3, Settings.builder() @@ -333,6 +334,7 @@ public void onFailure(Exception e) { * @throws Exception */ public void testRepeatedMasterChanges(String expectedMasterStabilitySymptomSubstring) throws Exception { + assumeFalse("jdk20 removed thread suspend/resume", Runtime.version().feature() >= 20); final List nodes = internalCluster().startNodes( 3, Settings.builder() @@ -422,6 +424,7 @@ public void testRepeatedMasterChanges(String expectedMasterStabilitySymptomSubst } public void testRepeatedNullMasterRecognizedAsGreenIfMasterDoesNotKnowItIsUnstable() throws Exception { + assumeFalse("jdk20 removed thread suspend/resume", Runtime.version().feature() >= 20); /* * In this test we have a single master-eligible node. We pause it repeatedly (simulating a long GC pause for example) so that * other nodes decide it is no longer the master. However since there is no other master-eligible node, another node is never diff --git a/test/framework/src/test/java/org/elasticsearch/test/disruption/LongGCDisruptionTests.java b/test/framework/src/test/java/org/elasticsearch/test/disruption/LongGCDisruptionTests.java index a64139edd2463..8b06184bc845b 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/disruption/LongGCDisruptionTests.java +++ b/test/framework/src/test/java/org/elasticsearch/test/disruption/LongGCDisruptionTests.java @@ -9,6 +9,7 @@ import org.elasticsearch.core.Nullable; import org.elasticsearch.test.ESTestCase; +import org.junit.BeforeClass; import java.lang.management.ThreadInfo; import java.util.ArrayList; @@ -40,6 +41,11 @@ public void executeLocked(Runnable r) { } } + @BeforeClass + public static void ignoreJdk20Plus() { + assumeFalse("jdk20 removed thread suspend/resume", Runtime.version().feature() >= 20); + } + public void testBlockingTimeout() throws Exception { final String nodeName = "test_node"; LongGCDisruption disruption = new LongGCDisruption(random(), nodeName) {