From 43dba37fd3ba0f1f2c093a9b5881e60588fa9b44 Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Tue, 30 Nov 2021 09:37:20 +0100 Subject: [PATCH] Fix stopping of old elasticsearch cluster (#81059) due to not exposing the PID of the underlaying cluster the Fixture Stop task was skipped, leaving running clusters behind after the build finished --- .../src/main/java/oldes/OldElasticsearch.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java b/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java index 7cb7fc4f142b8..bfdba42ee49ad 100644 --- a/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java +++ b/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java @@ -121,5 +121,9 @@ public static void main(String[] args) throws IOException { Path tmp = Files.createTempFile(baseDir, null, null); Files.write(tmp, Integer.toString(port).getBytes(StandardCharsets.UTF_8)); Files.move(tmp, baseDir.resolve("ports"), StandardCopyOption.ATOMIC_MOVE); + + tmp = Files.createTempFile(baseDir, null, null); + Files.write(tmp, Integer.toString(pid).getBytes(StandardCharsets.UTF_8)); + Files.move(tmp, baseDir.resolve("pid"), StandardCopyOption.ATOMIC_MOVE); } }