Skip to content

Commit a795069

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 f84286a commit a795069

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ class ClusterFormationTasks {
884884
}
885885
doLast {
886886
project.delete(node.pidFile)
887+
// Large tests can exhaust disk space, clean up on stop, but leave the data dir as some tests reuse it
888+
project.delete(project.fileTree(node.baseDir).minus(project.fileTree(node.dataDir)))
887889
}
888890
}
889891
}

0 commit comments

Comments
 (0)