From b820d5c60f57c947e3c6191ce26257fc67aaa717 Mon Sep 17 00:00:00 2001 From: William Brafford Date: Fri, 28 May 2021 14:02:25 -0400 Subject: [PATCH] Mute flaky security tests --- .../security/FIPS140SecureSettingsBootstrapCheckTests.java | 3 +++ .../xpack/security/authc/saml/SamlMetadataCommandTests.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/FIPS140SecureSettingsBootstrapCheckTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/FIPS140SecureSettingsBootstrapCheckTests.java index 5497dcfe46045..ad9597ae586c8 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/FIPS140SecureSettingsBootstrapCheckTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/FIPS140SecureSettingsBootstrapCheckTests.java @@ -9,6 +9,7 @@ import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IndexOutput; import org.apache.lucene.store.SimpleFSDirectory; +import org.elasticsearch.bootstrap.JavaVersion; import org.elasticsearch.common.settings.KeyStoreWrapper; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; @@ -27,6 +28,8 @@ public class FIPS140SecureSettingsBootstrapCheckTests extends AbstractBootstrapCheckTestCase { public void testLegacySecureSettingsIsNotAllowed() throws Exception { + assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/68995", + JavaVersion.current().compareTo(JavaVersion.parse("8")) == 0); assumeFalse("Can't run in a FIPS JVM, PBE is not available", inFipsJvm()); final Settings.Builder builder = Settings.builder() .put("path.home", createTempDir()) diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java index e239c8706b99f..5672d5d3ebb12 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlMetadataCommandTests.java @@ -8,6 +8,7 @@ import joptsimple.OptionSet; import org.elasticsearch.ExceptionsHelper; +import org.elasticsearch.bootstrap.JavaVersion; import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.UserException; import org.elasticsearch.common.collect.Tuple; @@ -550,6 +551,8 @@ public void testSigningMetadataWithPasswordProtectedPemInTerminal() throws Excep } public void testDefaultOptionsWithSigningAndMultipleEncryptionKeys() throws Exception { + assumeFalse("JDK bug JDK-8266279, https://github.com/elastic/elasticsearch/issues/68995", + JavaVersion.current().compareTo(JavaVersion.parse("8")) == 0); final Path dir = createTempDir(); final Path ksEncryptionFile = dir.resolve("saml-encryption.p12");