Skip to content

Commit b6335da

Browse files
committed
test running only java < 15
1 parent 81a4b38 commit b6335da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

httpclient5/src/test/java/org/apache/hc/client5/http/impl/routing/TestSystemDefaultRoutePlanner.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
import org.junit.jupiter.api.Assertions;
4646
import org.junit.jupiter.api.BeforeEach;
4747
import org.junit.jupiter.api.Test;
48+
import org.junit.jupiter.api.condition.EnabledForJreRange;
49+
import org.junit.jupiter.api.condition.JRE;
4850
import org.mockito.ArgumentMatchers;
4951
import org.mockito.Mockito;
5052

@@ -117,6 +119,7 @@ void testProxy() throws Exception {
117119
Assertions.assertEquals(isa1.getPort(), route.getProxyHost().getPort());
118120
}
119121

122+
@EnabledForJreRange(max = JRE.JAVA_15)
120123
@Test
121124
void testEnvHttpProxy() throws Exception {
122125
withEnvironmentVariable("HTTP_PROXY", "http://proxy.acme.local:8080")
@@ -131,7 +134,7 @@ void testEnvHttpProxy() throws Exception {
131134
Assertions.assertNull(route.getProxyHost());
132135
});
133136
}
134-
137+
@EnabledForJreRange(max = JRE.JAVA_15)
135138
@Test
136139
void testEnvHttpsProxy() throws Exception {
137140
withEnvironmentVariable("HTTPS_PROXY", "http://secure.proxy:8443")
@@ -146,7 +149,7 @@ void testEnvHttpsProxy() throws Exception {
146149
Assertions.assertNull(route.getProxyHost());
147150
});
148151
}
149-
152+
@EnabledForJreRange(max = JRE.JAVA_15)
150153
@Test
151154
void testEnvNoProxyExcludesHost() throws Exception {
152155
withEnvironmentVariable("HTTP_PROXY", "http://proxy:3128")

0 commit comments

Comments
 (0)