Browse Source

Remove the jdk directory to save space on bwc tests (#41743)

* Revert "Revert "Clean up  clusters between tests (#41187)""

This reverts commit 9efc853aa668e285ede733d37b6fc7a0f4b02041.

* Remove the jdk directory to save space on bwc tests

This PR adresses the same concern as #41187 in a different way.
It removes only the JDK from the distribution once the cluster stops,
so we keep the same disk space requirements as before adding the JDK.
This is still a temporary measure, testclusters already deals with this
by doing the equivalent of `cp -l` instead of an actual copy.
Alpar Torok 6 years ago
parent
commit
a66849dee7

+ 2 - 0
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

@@ -936,6 +936,8 @@ class ClusterFormationTasks {
             }
             doLast {
                 project.delete(node.pidFile)
+                // Large tests can exhaust disk space, clean up jdk from the distribution to save some space
+                project.delete(new File(node.homeDir, "jdk"))
             }
         }
     }