Skip to content

Commit

Permalink
Disable H3 tests by default with a system property to explicitly enab…
Browse files Browse the repository at this point in the history
…le 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>
  • Loading branch information
lorban authored Jun 16, 2022
1 parent 7cc461b commit 1f902f6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tests/test-http-client-transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,7 +31,11 @@ public static Stream<Transport> getActiveTransports()
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
Expand Down

0 comments on commit 1f902f6

Please sign in to comment.