From 6a575159e7eb2519d3c042a634fea0b879430f8b Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Sat, 21 Mar 2020 22:16:53 +0100 Subject: [PATCH] Following #1156 suggestion, maybe it fixes the issue, should not hurt current flow --- .../ep/zalenium/proxy/DockerSeleniumRemoteProxy.java | 6 ++++-- src/test/java/de/zalando/ep/zalenium/it/ParallelIT.java | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/zalando/ep/zalenium/proxy/DockerSeleniumRemoteProxy.java b/src/main/java/de/zalando/ep/zalenium/proxy/DockerSeleniumRemoteProxy.java index 61f22953d7..b5b461a745 100644 --- a/src/main/java/de/zalando/ep/zalenium/proxy/DockerSeleniumRemoteProxy.java +++ b/src/main/java/de/zalando/ep/zalenium/proxy/DockerSeleniumRemoteProxy.java @@ -1,9 +1,11 @@ package de.zalando.ep.zalenium.proxy; import java.io.IOException; +import java.nio.file.CopyOption; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.util.List; import java.util.Map; import java.util.Optional; @@ -658,7 +660,7 @@ void copyVideos(final String containerId) { if (!Files.exists(videoFile.getParent())) { Files.createDirectories(videoFile.getParent()); } - Files.copy(entry.get(), videoFile); + Files.copy(entry.get(), videoFile, StandardCopyOption.REPLACE_EXISTING); CommonProxyUtilities.setFilePermissions(videoFile); videoWasCopied = true; LOGGER.debug("Video file copied to: {}/{}", testInformation.getVideoFolderPath(), testInformation.getFileName()); @@ -869,4 +871,4 @@ public enum ShutdownType { } -} \ No newline at end of file +} diff --git a/src/test/java/de/zalando/ep/zalenium/it/ParallelIT.java b/src/test/java/de/zalando/ep/zalenium/it/ParallelIT.java index a2c22cf17e..cb7b38b94a 100644 --- a/src/test/java/de/zalando/ep/zalenium/it/ParallelIT.java +++ b/src/test/java/de/zalando/ep/zalenium/it/ParallelIT.java @@ -31,7 +31,7 @@ public class ParallelIT { private static final String testingBotIntegration = "testingBot"; private static final String crossBrowserTestingIntegration = "crossBrowserTesting"; private static final String lambdaTestIntegration = "lambdaTest"; - + // Zalenium setup variables private static final String ZALENIUM_HOST = System.getenv("ZALENIUM_GRID_HOST") != null ? System.getenv("ZALENIUM_GRID_HOST") : "localhost"; @@ -183,7 +183,7 @@ public void loadTheInternetPageAndCheckTitle(DesiredCapabilities desiredCapabili // Go to the homepage getWebDriver().get("https://the-internet.herokuapp.com/"); - // Assert that the title is the expected one + // Assert that the titleDockerSeleniumRemoteProxy is the expected one assertThat(getWebDriver().getTitle(), containsString("Internet")); }