From 6c4dcb308ccfcda17359591d7cbfd77de8438b05 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Mon, 4 Mar 2019 08:37:43 +0200 Subject: [PATCH] Un-mute and fix BuildExamplePluginsIT (#38899) * Un-mute and fix BuildExamplePluginsIT There doesn't seem to be anything wrong with the test iteself. I think the failure were CI performance related, but while it was muted, some failures managed to sneak in. Closes #38784 * PR review --- build.gradle | 2 +- .../gradle/test/ClusterFormationTasks.groovy | 2 +- .../org/elasticsearch/gradle/BuildExamplePluginsIT.java | 7 ------- libs/ssl-config/build.gradle | 4 +--- .../examples/security-authorization-engine/build.gradle | 8 ++++++-- plugins/transport-nio/build.gradle | 1 + 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index aeed847bdb9ed..3fc6064346be7 100644 --- a/build.gradle +++ b/build.gradle @@ -240,7 +240,7 @@ allprojects { "org.elasticsearch.plugin:rank-eval-client:${version}": ':modules:rank-eval', // for security example plugins "org.elasticsearch.plugin:x-pack-core:${version}": ':x-pack:plugin:core', - "org.elasticsearch.client.x-pack-transport:${version}": ':x-pack:transport-client' + "org.elasticsearch.client:x-pack-transport:${version}": ':x-pack:transport-client' ] /* diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index e750385a66916..b41a32d48a46b 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -224,7 +224,7 @@ class ClusterFormationTasks { classifier = "" // for bwc, before we had classifiers } // group does not matter as it is not used when we pull from the ivy repo that points to the download service - dependency = "dnm:${artifactName}:${elasticsearchVersion}${classifier}@${packaging}" + dependency = "dnm:${artifactName}:${elasticsearchVersion}-${classifier}@${packaging}" } project.dependencies.add(configuration.name, dependency) } diff --git a/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java b/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java index 39d6e433ac36e..4b52d47937fa2 100644 --- a/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java +++ b/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java @@ -23,7 +23,6 @@ import org.elasticsearch.gradle.test.GradleIntegrationTestCase; import org.gradle.testkit.runner.GradleRunner; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Rule; import org.junit.rules.TemporaryFolder; @@ -39,7 +38,6 @@ import java.util.Objects; import java.util.stream.Collectors; -@Ignore // Awaiting a fix in https://github.com/elastic/elasticsearch/issues/37889. public class BuildExamplePluginsIT extends GradleIntegrationTestCase { private static final List EXAMPLE_PLUGINS = Collections.unmodifiableList( @@ -78,11 +76,6 @@ public static Iterable parameters() { public void testCurrentExamplePlugin() throws IOException { FileUtils.copyDirectory(examplePlugin, tmpDir.getRoot()); - // just get rid of deprecation warnings - Files.write( - getTempPath("settings.gradle"), - "enableFeaturePreview('STABLE_PUBLISHING')\n".getBytes(StandardCharsets.UTF_8) - ); adaptBuildScriptForTest(); diff --git a/libs/ssl-config/build.gradle b/libs/ssl-config/build.gradle index 85693780a8b71..6c59e9ddb15b5 100644 --- a/libs/ssl-config/build.gradle +++ b/libs/ssl-config/build.gradle @@ -16,9 +16,7 @@ * specific language governing permissions and limitations * under the License. */ - -apply plugin: 'nebula.maven-base-publish' -apply plugin: 'nebula.maven-scm' +apply plugin: "nebula.maven-scm" dependencies { compile "org.elasticsearch:elasticsearch-core:${version}" diff --git a/plugins/examples/security-authorization-engine/build.gradle b/plugins/examples/security-authorization-engine/build.gradle index d0d227e221b68..f869e4872ddc3 100644 --- a/plugins/examples/security-authorization-engine/build.gradle +++ b/plugins/examples/security-authorization-engine/build.gradle @@ -5,11 +5,13 @@ esplugin { description 'An example spi extension plugin for security that implements an Authorization Engine' classname 'org.elasticsearch.example.AuthorizationEnginePlugin' extendedPlugins = ['x-pack-security'] + licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile rootProject.file('NOTICE.txt') } dependencies { - compileOnly "org.elasticsearch.plugin:x-pack-core:${version}" - testCompile "org.elasticsearch.client.x-pack-transport:${version}" + compileOnly "org.elasticsearch.plugin:x-pack-core:${versions.elasticsearch}" + testCompile "org.elasticsearch.client:x-pack-transport:${versions.elasticsearch}" } @@ -19,6 +21,8 @@ integTestRunner { integTestCluster { dependsOn buildZip + distribution = 'default' + setting 'xpack.security.enabled', 'true' setting 'xpack.ilm.enabled', 'false' setting 'xpack.ml.enabled', 'false' diff --git a/plugins/transport-nio/build.gradle b/plugins/transport-nio/build.gradle index 1bb0ca841bf6b..197f914f57242 100644 --- a/plugins/transport-nio/build.gradle +++ b/plugins/transport-nio/build.gradle @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +apply plugin: "nebula.maven-scm" esplugin { description 'The nio transport.'