diff --git a/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/util/FileUtilTest.java b/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/util/FileUtilTest.java index 4ccb80c502..2efd889ad4 100644 --- a/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/util/FileUtilTest.java +++ b/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/util/FileUtilTest.java @@ -161,6 +161,7 @@ void copy_whenFileCopied_shouldPreserveLastModifiedTimestamp() throws IOExceptio Files.write(sourceFile.toPath(), "testdata".getBytes(StandardCharsets.UTF_8)); long originalTimestamp = new Date().getTime() - 10; assertThat(sourceFile.setLastModified(originalTimestamp)).isTrue(); + originalTimestamp = sourceFile.lastModified(); // Update last modified, because different platforms have different precision. Path targetFilePath = folder.toPath().resolve("target"); // When