From bce5684cf580a14175d6ba373c27db779b790a90 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 17 Oct 2024 09:14:59 +0200 Subject: [PATCH] [MNG-8322] The EventSpy receives the new settings request/result --- .../apache/maven/it/MavenITmng4936EventSpyTest.java | 10 ++++++++-- .../it/MavenITmng6558ToolchainsBuildingEventTest.java | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4936EventSpyTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4936EventSpyTest.java index b9b597de9..6f70dc55c 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4936EventSpyTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4936EventSpyTest.java @@ -60,10 +60,16 @@ public void testit() throws Exception { assertTrue(lines.toString(), lines.get(lines.size() - 1).toString().startsWith("close")); assertTrue( lines.toString(), - lines.contains("event: org.apache.maven.settings.building.DefaultSettingsBuildingRequest")); + lines.contains( + matchesVersionRange("[4.0.0-beta-5,)") + ? "event: org.apache.maven.api.services.SettingsBuilderRequest$SettingsBuilderRequestBuilder$DefaultSettingsBuilderRequest" + : "event: org.apache.maven.settings.building.DefaultSettingsBuildingRequest")); assertTrue( lines.toString(), - lines.contains("event: org.apache.maven.settings.building.DefaultSettingsBuildingResult")); + lines.contains( + matchesVersionRange("[4.0.0-beta-5,)") + ? "event: org.apache.maven.internal.impl.DefaultSettingsBuilder$DefaultSettingsBuilderResult" + : "event: org.apache.maven.settings.building.DefaultSettingsBuildingResult")); assertTrue(lines.toString(), lines.contains("event: org.apache.maven.execution.DefaultMavenExecutionRequest")); assertTrue(lines.toString(), lines.contains("event: org.apache.maven.execution.DefaultMavenExecutionResult")); assertTrue( diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6558ToolchainsBuildingEventTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6558ToolchainsBuildingEventTest.java index 19dc466f3..baa48b7f5 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6558ToolchainsBuildingEventTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6558ToolchainsBuildingEventTest.java @@ -58,9 +58,15 @@ public void testit() throws Exception { assertTrue(lines.toString(), lines.get(lines.size() - 1).startsWith("close")); assertTrue( lines.toString(), - lines.contains("event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest")); + lines.contains( + matchesVersionRange("[4.0.0-beta-5,)") + ? "event: org.apache.maven.api.services.ToolchainsBuilderRequest$ToolchainsBuilderRequestBuilder$DefaultToolchainsBuilderRequest" + : "event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest")); assertTrue( lines.toString(), - lines.contains("event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingResult")); + lines.contains( + matchesVersionRange("[4.0.0-beta-5,)") + ? "event: org.apache.maven.internal.impl.DefaultToolchainsBuilder$DefaultToolchainsBuilderResult" + : "event: org.apache.maven.toolchain.building.DefaultToolchainsBuildingResult")); } }