Skip to content

Commit 44a0c46

Browse files
committed
Clean up clusters between tests (#41187)
This PR adds additional cleanup when stopping the node. The data dir is excepted because it gets reused in some tests. Without this cleanup the number of working dir copies could grew to exhaust all available disk space.
1 parent c77e10b commit 44a0c46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,8 @@ class ClusterFormationTasks {
964964
}
965965
doLast {
966966
project.delete(node.pidFile)
967+
// Large tests can exhaust disk space, clean up on stop, but leave the data dir as some tests reuse it
968+
project.delete(project.fileTree(node.baseDir).minus(project.fileTree(node.dataDir)))
967969
}
968970
}
969971
}

0 commit comments

Comments
 (0)