瀏覽代碼

Ignore temporary files when syncing test cluster distribution (#81482)

Mark Vieira 3 年之前
父節點
當前提交
9f37097a74

+ 5 - 1
build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

@@ -1169,13 +1169,17 @@ public class ElasticsearchNode implements TestClusterConfiguration {
                         throw new UncheckedIOException("Can't create directory " + destination.getParent(), e);
                     }
                 } else {
+                    // Ignore these files that are sometimes let behind by the JVM
+                    if (relativeDestination.toFile().getName().startsWith(".attach_pid")) {
+                        return;
+                    }
+
                     try {
                         Files.createDirectories(destination.getParent());
                     } catch (IOException e) {
                         throw new UncheckedIOException("Can't create directory " + destination.getParent(), e);
                     }
                     syncMethod.accept(destination, source);
-
                 }
             });
         } catch (IOException e) {