Disable H3 tests by default with a system property to explicitly enable them (#8150)

Fixes #8149 disable H3 tests by default with a system property to explicitly enable them

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2022-06-16 15:59:58 +02:00 committed by GitHub
parent 7cc461b8f3
commit 1f902f6371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -13,9 +13,23 @@
<properties>
<bundle-symbolic-name>${project.groupId}.client.http</bundle-symbolic-name>
<h3.test.enabled>false</h3.test.enabled>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<org.eclipse.jetty.http.client.TransportProvider.H3.enable>${h3.test.enabled}</org.eclipse.jetty.http.client.TransportProvider.H3.enable>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -14,6 +14,7 @@
package org.eclipse.jetty.http.client;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.stream.Stream;
import org.eclipse.jetty.util.StringUtil;
@ -30,7 +31,11 @@ public class TransportProvider implements ArgumentsProvider
if (!StringUtil.isBlank(transports))
return Arrays.stream(transports.split("\\s*,\\s*")).map(Transport::valueOf);
return Arrays.stream(Transport.values());
EnumSet<Transport> ts = EnumSet.allOf(Transport.class);
// Disable H3 tests unless explicitly enabled with a system property.
if (!Boolean.getBoolean(Transport.class.getName() + ".H3.enable"))
ts.remove(Transport.H3);
return ts.stream();
}
@Override