From 52314c94931df92f83669b39e1ee0c192533ab87 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 28 Jun 2023 11:46:13 +0200 Subject: [PATCH] Ignore warnings at the beginning of the build caused by https://github.com/actions/setup-java/pull/503/ --- .../maven/it/MavenITmng5576CdFriendlyVersions.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java index 9eae5d230..8602ce5f2 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java @@ -59,8 +59,13 @@ public void testContinuousDeliveryFriendlyVersionsAreWarningFreeWithoutBuildCons assertEquals("1.0.0.changelist", props.getProperty("project.version")); List lines = verifier.loadFile(new File(testDir, "log.txt"), false); + boolean seenScanning = false; for (String line : lines) { - assertFalse(String.join("\n", lines), line.contains("WARNING")); + seenScanning |= line.contains("Scanning for projects"); + if (seenScanning) { + assertFalse(String.join("\n", lines), line.contains("WARNING")); + } + } } @@ -88,8 +93,12 @@ public void testContinuousDeliveryFriendlyVersionsAreWarningFreeWithBuildConsume assertEquals("1.0.0.changelist", props.getProperty("project.version")); List lines = verifier.loadFile(new File(testDir, "log-bc.txt"), false); + boolean seenScanning = false; for (String line : lines) { - assertFalse(String.join("\n", lines), line.contains("WARNING")); + seenScanning |= line.contains("Scanning for projects"); + if (seenScanning) { + assertFalse(String.join("\n", lines), line.contains("WARNING")); + } } } }