Browse Source

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
Alpar Torok 6 years ago
parent
commit
41a29a74a2

+ 1 - 1
build.gradle

@@ -241,7 +241,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'
   ]
 
   /*

+ 1 - 1
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)
     }

+ 0 - 7
buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java

@@ -23,7 +23,6 @@ import org.apache.commons.io.FileUtils;
 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.List;
 import java.util.Objects;
 import java.util.stream.Collectors;
 
-@Ignore // https://github.com/elastic/elasticsearch/issues/38784
 public class BuildExamplePluginsIT extends GradleIntegrationTestCase {
 
     private static final List<File> EXAMPLE_PLUGINS = Collections.unmodifiableList(
@@ -78,11 +76,6 @@ public class BuildExamplePluginsIT extends GradleIntegrationTestCase {
 
     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();
 

+ 1 - 3
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}"

+ 6 - 2
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'

+ 1 - 0
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.'