45
45
import org .junit .jupiter .api .Assertions ;
46
46
import org .junit .jupiter .api .BeforeEach ;
47
47
import org .junit .jupiter .api .Test ;
48
+ import org .junit .jupiter .api .condition .EnabledForJreRange ;
49
+ import org .junit .jupiter .api .condition .JRE ;
48
50
import org .mockito .ArgumentMatchers ;
49
51
import org .mockito .Mockito ;
50
52
@@ -117,6 +119,7 @@ void testProxy() throws Exception {
117
119
Assertions .assertEquals (isa1 .getPort (), route .getProxyHost ().getPort ());
118
120
}
119
121
122
+ @ EnabledForJreRange (max = JRE .JAVA_15 )
120
123
@ Test
121
124
void testEnvHttpProxy () throws Exception {
122
125
withEnvironmentVariable ("HTTP_PROXY" , "http://proxy.acme.local:8080" )
@@ -131,7 +134,7 @@ void testEnvHttpProxy() throws Exception {
131
134
Assertions .assertNull (route .getProxyHost ());
132
135
});
133
136
}
134
-
137
+ @ EnabledForJreRange ( max = JRE . JAVA_15 )
135
138
@ Test
136
139
void testEnvHttpsProxy () throws Exception {
137
140
withEnvironmentVariable ("HTTPS_PROXY" , "http://secure.proxy:8443" )
@@ -146,7 +149,7 @@ void testEnvHttpsProxy() throws Exception {
146
149
Assertions .assertNull (route .getProxyHost ());
147
150
});
148
151
}
149
-
152
+ @ EnabledForJreRange ( max = JRE . JAVA_15 )
150
153
@ Test
151
154
void testEnvNoProxyExcludesHost () throws Exception {
152
155
withEnvironmentVariable ("HTTP_PROXY" , "http://proxy:3128" )
0 commit comments