From 293297ae3da13d4c121cc1c0c8676fada3aa5bac Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Fri, 29 Mar 2019 16:46:55 +0200 Subject: [PATCH] Fix repository-hdfs when no docker and unnecesary fixture The hdfs-fixture is actually executed in plugin/repository-hdfs as a dependency. The fixture is not needed and actually causes a failure because we have two copies now and both use the same ports. --- plugins/repository-hdfs/build.gradle | 1 + test/fixtures/hdfs-fixture/build.gradle | 15 +-------------- test/fixtures/hdfs-fixture/docker-compose.yml | 12 ------------ 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 test/fixtures/hdfs-fixture/docker-compose.yml diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index 946b377491d..d5addc663ca 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -79,6 +79,7 @@ for (String fixtureName : ['hdfsFixture', 'haHdfsFixture', 'secureHdfsFixture', dependsOn project.configurations.hdfsFixture, project(':test:fixtures:krb5kdc-fixture').tasks.postProcessFixture executable = new File(project.runtimeJavaHome, 'bin/java') env 'CLASSPATH', "${ -> project.configurations.hdfsFixture.asPath }" + onlyIf { project(':test:fixtures:krb5kdc-fixture').buildFixture.enabled } waitCondition = { fixture, ant -> // the hdfs.MiniHDFS fixture writes the ports file when // it's ready, so we can just wait for the file to exist diff --git a/test/fixtures/hdfs-fixture/build.gradle b/test/fixtures/hdfs-fixture/build.gradle index f2aebda46b8..bd2dbec6649 100644 --- a/test/fixtures/hdfs-fixture/build.gradle +++ b/test/fixtures/hdfs-fixture/build.gradle @@ -18,23 +18,10 @@ */ apply plugin: 'elasticsearch.build' -apply plugin: 'elasticsearch.test.fixtures' dependencies { compile "org.apache.hadoop:hadoop-minicluster:2.8.1" } -task syncClasses(type: Sync) { - from sourceSets.test.runtimeClasspath - into "${buildDir}/fixture" -} - -preProcessFixture { - dependsOn syncClasses - - doLast { - file("${buildDir}/shared").mkdirs() - } -} - unitTest.enabled = false +thirdPartyAudit.enabled = false diff --git a/test/fixtures/hdfs-fixture/docker-compose.yml b/test/fixtures/hdfs-fixture/docker-compose.yml deleted file mode 100644 index ee86bf90fec..00000000000 --- a/test/fixtures/hdfs-fixture/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3' -services: - hdfs: - hostname: hdfs.build.elastic.co - image: ubuntu:14.04 - volumes: - - ./build/fixture:/fixture - ports: - # FIXME: Don't fix the host ports - - "9999:9999" - - "9998:9999" - entrypoint: apt-get update && apt-get install net-tools && java -cp "/fixture:/fixture/*" hdfs.MiniHDFS /data