diff --git a/openjdk.test.modularity/src/tests/com.test/net/adoptopenjdk/test/modularity/junit/TestLayers.java b/openjdk.test.modularity/src/tests/com.test/net/adoptopenjdk/test/modularity/junit/TestLayers.java index 675db5f3..70e95a59 100644 --- a/openjdk.test.modularity/src/tests/com.test/net/adoptopenjdk/test/modularity/junit/TestLayers.java +++ b/openjdk.test.modularity/src/tests/com.test/net/adoptopenjdk/test/modularity/junit/TestLayers.java @@ -72,7 +72,9 @@ public void testLayers() throws Exception { * at command line) will cause classes to be unloaded, which will trigger *the trace point events that the test validation depends on.*/ System.gc(); - Thread.sleep(2000); - System.gc(); + for (int i = 0; i < 3; i++) { + Thread.sleep(200); + System.gc(); + } } }