From 56f2340def3748934512cfd91dcb34ecabf07337 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 1 Aug 2018 13:59:16 +0100 Subject: [PATCH 1/3] Suppress Wildfly test in FIPS JVMs Until #32534 is fixed, this suppresses this failing test on FIPS JVMs, but allows the suite to pass and includes a dummy @AwaitsFix test too. --- .../java/org/elasticsearch/wildfly/WildflyIT.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java b/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java index 46fafebeb4e2d..953f46f85e9db 100644 --- a/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java +++ b/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java @@ -46,13 +46,28 @@ import java.util.Map; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.elasticsearch.test.ESTestCase.inFipsJvm; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; public class WildflyIT extends LuceneTestCase { + public void testSoThatSuiteDoesNotFail() { + // There's only one real test in this test suite, so simply suppressing it with assumeFalse() doesn't help. This + // no-op test allows the real test to be suppressed on FIPS JVMs. + // TODO remove when https://github.com/elastic/elasticsearch/issues/32534 fixed + } + + @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/32534") + public void testThatCanBeMarkedAsAwaitsFix() { + // Don't want to @AwaitsFix the real test because it should still run on non-FIPS JVMs, but it's useful to have an @AwaitsFix + // so that the issue appears in the @AwaitsFix reports. + // TODO remove when https://github.com/elastic/elasticsearch/issues/32534 fixed + } + public void testTransportClient() throws URISyntaxException, IOException { + assumeFalse("https://github.com/elastic/elasticsearch/issues/32534", inFipsJvm()); try (CloseableHttpClient client = HttpClientBuilder.create().build()) { final String str = String.format( Locale.ROOT, From d6c11d0022a4f9b1206c8ee5b6e6dec69d6ed75c Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 3 Aug 2018 14:18:24 +0100 Subject: [PATCH 2/3] Revert "Suppress Wildfly test in FIPS JVMs" This reverts commit 56f2340def3748934512cfd91dcb34ecabf07337. --- .../java/org/elasticsearch/wildfly/WildflyIT.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java b/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java index 953f46f85e9db..46fafebeb4e2d 100644 --- a/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java +++ b/qa/wildfly/src/test/java/org/elasticsearch/wildfly/WildflyIT.java @@ -46,28 +46,13 @@ import java.util.Map; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.ESTestCase.inFipsJvm; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; public class WildflyIT extends LuceneTestCase { - public void testSoThatSuiteDoesNotFail() { - // There's only one real test in this test suite, so simply suppressing it with assumeFalse() doesn't help. This - // no-op test allows the real test to be suppressed on FIPS JVMs. - // TODO remove when https://github.com/elastic/elasticsearch/issues/32534 fixed - } - - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/32534") - public void testThatCanBeMarkedAsAwaitsFix() { - // Don't want to @AwaitsFix the real test because it should still run on non-FIPS JVMs, but it's useful to have an @AwaitsFix - // so that the issue appears in the @AwaitsFix reports. - // TODO remove when https://github.com/elastic/elasticsearch/issues/32534 fixed - } - public void testTransportClient() throws URISyntaxException, IOException { - assumeFalse("https://github.com/elastic/elasticsearch/issues/32534", inFipsJvm()); try (CloseableHttpClient client = HttpClientBuilder.create().build()) { final String str = String.format( Locale.ROOT, From cc48f865cba6ef22c36697075bf2cc0626b0e26e Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 3 Aug 2018 14:30:50 +0100 Subject: [PATCH 3/3] Suppress on FIPS JVMs much as on Windows --- qa/wildfly/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/wildfly/build.gradle b/qa/wildfly/build.gradle index 6c6bf5d9b31b9..21d764a565aa8 100644 --- a/qa/wildfly/build.gradle +++ b/qa/wildfly/build.gradle @@ -84,7 +84,7 @@ task deploy(type: Copy) { } task writeElasticsearchProperties { - onlyIf { !Os.isFamily(Os.FAMILY_WINDOWS) } + onlyIf { !Os.isFamily(Os.FAMILY_WINDOWS) && !inFipsJvm } dependsOn 'integTestCluster#wait', deploy doLast { final File elasticsearchProperties = file("${wildflyInstall}/standalone/configuration/elasticsearch.properties") @@ -178,7 +178,7 @@ task stopWildfly(type: LoggedExec) { commandLine "${wildflyInstall}/bin/jboss-cli.sh", "--controller=localhost:${-> managementPort}", "--connect", "command=shutdown" } -if (!Os.isFamily(Os.FAMILY_WINDOWS)) { +if (!Os.isFamily(Os.FAMILY_WINDOWS) && !inFipsJvm) { integTestRunner.dependsOn(configureTransportClient) final TaskExecutionAdapter logDumpListener = new TaskExecutionAdapter() { @Override