Fix ITs master build (#323)

I was unaware that for master Maven 3.9.x is used.
So the original commit 8880639cee
does not work with 3.9.x, this PR fixes it.
This commit is contained in:
Tamas Cservenak 2023-12-06 15:56:55 +01:00 committed by GitHub
parent 8880639cee
commit 38f543d94a
2 changed files with 10 additions and 2 deletions

View File

@ -75,6 +75,10 @@ public class MavenITmng2741PluginMetadataResolutionErrorMessageTest extends Abst
List<String> lines = verifier.loadLines(verifier.getLogFileName(), "UTF-8");
for (String line : lines) {
sb.append(line).append(System.lineSeparator());
if (line.matches(".*Connection refused.*")) {
foundCause = true;
break;
}
if (line.matches(
".*Connection to http://localhost:54312.*refused.*")) { // URL may be with or without trailing /
foundCause = true;

View File

@ -107,6 +107,8 @@ public class MavenITmng7470ResolverTransportTest extends AbstractMavenIntegratio
private static final String WAGON_LOG_SNIPPET = "[DEBUG] Using transporter WagonTransporter";
private static final String APACHE_LOG_SNIPPET_OLD = "[DEBUG] Using transporter HttpTransporter";
private static final String APACHE_LOG_SNIPPET = "[DEBUG] Using transporter ApacheTransporter";
private static final String JDK_LOG_SNIPPET = "[DEBUG] Using transporter JdkTransporter";
@ -130,7 +132,7 @@ public class MavenITmng7470ResolverTransportTest extends AbstractMavenIntegratio
if (isJdkTransportUsable() && isJdkTransportPresent()) {
return JDK_LOG_SNIPPET;
}
return APACHE_LOG_SNIPPET;
return isJdkTransportPresent() ? APACHE_LOG_SNIPPET : APACHE_LOG_SNIPPET_OLD;
}
@Test
@ -145,7 +147,9 @@ public class MavenITmng7470ResolverTransportTest extends AbstractMavenIntegratio
@Test
public void testResolverTransportApache() throws Exception {
performTest(isJdkTransportPresent() ? "apache" : "native", APACHE_LOG_SNIPPET);
performTest(
isJdkTransportPresent() ? "apache" : "native",
isJdkTransportPresent() ? APACHE_LOG_SNIPPET : APACHE_LOG_SNIPPET_OLD);
}
@Test