From dd08faa510c820b8aa15446eaba838065db50f9d Mon Sep 17 00:00:00 2001 From: Tim Vernum Date: Tue, 3 Aug 2021 11:20:13 +1000 Subject: [PATCH] [Test] Mute more certificate tests on JDK8 u292 JDK 1.8.0_292 has a race condition that sometimes causes the PBEWithSHA1AndDESede algorithm to appear as unavailable. This change mutes additional tests on this JDK build Relates: #75952, #75571, #75718 --- .../xpack/security/cli/CertificateToolTests.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/CertificateToolTests.java b/x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/CertificateToolTests.java index f96f3b3d0c474..0a6b5d5ad9681 100644 --- a/x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/CertificateToolTests.java +++ b/x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/CertificateToolTests.java @@ -40,7 +40,6 @@ import org.elasticsearch.core.internal.io.IOUtils; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.jdk.JavaVersion; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.xpack.core.ssl.CertParsingUtils; @@ -419,6 +418,9 @@ public void testGeneratingSignedPemCertificates() throws Exception { } public void testHandleLongPasswords() throws Exception { + assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/75571", + "1.8.0_292".equals(System.getProperty("java.version"))); + final Path tempDir = initTempDir(); final MockTerminal terminal = new MockTerminal(); @@ -631,8 +633,8 @@ public void testNameValues() throws Exception { * - Checks that all 3 certificates have the right values based on the command line options provided during generation */ public void testCreateCaAndMultipleInstances() throws Exception { - assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/72359", - JavaVersion.current().compareTo(JavaVersion.parse("8")) == 0); + assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/75571", + "1.8.0_292".equals(System.getProperty("java.version"))); final Path tempDir = initTempDir(); final MockTerminal terminal = new MockTerminal(); @@ -782,8 +784,8 @@ Path resolveOutputPath(Terminal terminal, OptionSet options, String defaultFilen * - Checks that the PKCS12 certificate and the PEM certificate trust one another */ public void testTrustBetweenPEMandPKCS12() throws Exception { - assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/72359", - JavaVersion.current().compareTo(JavaVersion.parse("8")) == 0); + assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/75571", + "1.8.0_292".equals(System.getProperty("java.version"))); final Path tempDir = initTempDir(); final MockTerminal terminal = new MockTerminal();