Share a bit more context why we're doing the ugly Thread.sleep
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 983a112..afc46de 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,10 +63,13 @@
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);
+ if ( System.getProperty( "java.version", "" ).startsWith( "1." ) )
+ {
+ // 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. Java 8 on Linux and
+ // macOS returns 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() );