Skip to content

Commit a2e55ae

Browse files
committed
Clean up cluster directories
Signed-off-by: James Duong <duong.james@gmail.com>
1 parent 1131f22 commit a2e55ae

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

java/integTest/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,19 @@ tasks.register('stopAllBeforeTests') {
121121
// delete dirs if stop failed due to https://github.com/valkey-io/valkey-glide/issues/849
122122
tasks.register('clearDirs', Delete) {
123123
delete "${project.rootDir}/../utils/clusters"
124+
125+
// Also clean up bash script cluster directories in WSL/Linux temp
126+
if (isWindows) {
127+
exec {
128+
commandLine 'wsl', '--', 'bash', '-c', 'rm -rf /tmp/clusters /tmp/cluster-* || true'
129+
ignoreExitValue true
130+
}
131+
} else {
132+
exec {
133+
commandLine 'bash', '-c', 'rm -rf /tmp/clusters /tmp/cluster-* || true'
134+
ignoreExitValue true
135+
}
136+
}
124137
}
125138

126139
tasks.register('startCluster') {

0 commit comments

Comments
 (0)