This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MNG-4660 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 605ba4af750f1fc64166f8087becc29943c6df2f Author: Maarten Mulders <[email protected]> AuthorDate: Tue Apr 7 19:35:40 2020 +0200 Add small delay between two Verifier invocations. It also makes sure we're not hit by tests that run so fast, that the difference in file modification time is too small to observe. Some combinations of Java version, OS and filesystem return that value with "just" second precision, which is not detailed enough. --- .../org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java index ea8100f..983a112 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java @@ -63,6 +63,11 @@ public class MavenITmng4660OutdatedPackagedArtifact extends AbstractMavenIntegra verifier1.assertFilePresent( module1Jar.toString() ); verifier1.resetStreams(); + // Simulating the delay between two invocations. It also makes sure we're not hit by tests that run so fast, + // that the difference in file modification time (see below) is too small to observe. Some combinations of OS + // and filesystem return that value with "just" second precision, which is not detailed enough. + Thread.sleep(1_000); + // 2. Create a properties file with some content and compile only that module (module A). final Verifier verifier2 = newVerifier( testDir.getAbsolutePath() ); final Path resourcesDirectory = Files.createDirectories( Paths.get( testDir.toString(), "module-a", "src", "main", "resources" ) );
