Skip to content

Commit 1f902f6

Browse files
authored
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 <[email protected]>
1 parent 7cc461b commit 1f902f6

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tests/test-http-client-transport/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,23 @@
1313

1414
<properties>
1515
<bundle-symbolic-name>${project.groupId}.client.http</bundle-symbolic-name>
16+
<h3.test.enabled>false</h3.test.enabled>
1617
</properties>
1718

1819
<build>
20+
<pluginManagement>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-surefire-plugin</artifactId>
25+
<configuration>
26+
<systemPropertyVariables>
27+
<org.eclipse.jetty.http.client.TransportProvider.H3.enable>${h3.test.enabled}</org.eclipse.jetty.http.client.TransportProvider.H3.enable>
28+
</systemPropertyVariables>
29+
</configuration>
30+
</plugin>
31+
</plugins>
32+
</pluginManagement>
1933
<plugins>
2034
<plugin>
2135
<groupId>org.apache.maven.plugins</groupId>

tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/TransportProvider.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package org.eclipse.jetty.http.client;
1515

1616
import java.util.Arrays;
17+
import java.util.EnumSet;
1718
import java.util.stream.Stream;
1819

1920
import org.eclipse.jetty.util.StringUtil;
@@ -30,7 +31,11 @@ public static Stream<Transport> getActiveTransports()
3031
if (!StringUtil.isBlank(transports))
3132
return Arrays.stream(transports.split("\\s*,\\s*")).map(Transport::valueOf);
3233

33-
return Arrays.stream(Transport.values());
34+
EnumSet<Transport> ts = EnumSet.allOf(Transport.class);
35+
// Disable H3 tests unless explicitly enabled with a system property.
36+
if (!Boolean.getBoolean(Transport.class.getName() + ".H3.enable"))
37+
ts.remove(Transport.H3);
38+
return ts.stream();
3439
}
3540

3641
@Override

0 commit comments

Comments
 (0)