From d604820de9e624f9fd08e5bb372da39945bf1d79 Mon Sep 17 00:00:00 2001 From: Stefano Franz <stefano.franz@r3.com> Date: Tue, 26 Nov 2019 13:05:02 +0000 Subject: [PATCH] put podlogs into folder with taskName to support parallel jenkins unit and integration test run (#5759) --- buildSrc/src/main/groovy/net/corda/testing/KubesTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/net/corda/testing/KubesTest.java b/buildSrc/src/main/groovy/net/corda/testing/KubesTest.java index cc5775aaae..7bf5b05d59 100644 --- a/buildSrc/src/main/groovy/net/corda/testing/KubesTest.java +++ b/buildSrc/src/main/groovy/net/corda/testing/KubesTest.java @@ -11,7 +11,6 @@ import io.fabric8.kubernetes.api.model.Quantity; import io.fabric8.kubernetes.api.model.Status; import io.fabric8.kubernetes.api.model.StatusCause; import io.fabric8.kubernetes.api.model.StatusDetails; -import io.fabric8.kubernetes.api.model.Toleration; import io.fabric8.kubernetes.api.model.TolerationBuilder; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; @@ -424,7 +423,9 @@ public class KubesTest extends DefaultTask { private File startLogPumping(InputStream stdOutIs, int podIdx, File podLogsDirectory, boolean printOutput) throws IOException { - File outputFile = new File(podLogsDirectory, "container-" + podIdx + ".log"); + File outputDir = new File(podLogsDirectory, taskToExecuteName); + outputDir.mkdirs(); + File outputFile = new File(outputDir, "container-" + podIdx + ".log"); outputFile.createNewFile(); Thread loggingThread = new Thread(() -> { try (BufferedWriter out = new BufferedWriter(new FileWriter(outputFile, true));