@@ -95,7 +95,7 @@ public void establishTunnelWithValidSslProxySucceeds() throws Exception {
95
95
targetHost ,
96
96
targetPort ,
97
97
clientSslSocketFactory ,
98
- proxyCredentialsProvider , false );
98
+ proxyCredentialsProvider );
99
99
100
100
assertNotNull ("Tunnel socket should not be null" , tunnelSocket );
101
101
assertTrue ("Tunnel socket should be connected" , tunnelSocket .isConnected ());
@@ -124,8 +124,7 @@ public void establishTunnelWithNotTrustedCertificatedThrows() throws Exception {
124
124
"example.com" ,
125
125
443 ,
126
126
untrustedSocketFactory ,
127
- proxyCredentialsProvider ,
128
- false );
127
+ proxyCredentialsProvider );
129
128
fail ("Should have thrown exception for untrusted certificate" );
130
129
} catch (IOException e ) {
131
130
assertTrue ("Exception should be SSL-related" , e .getMessage ().contains ("certification" ));
@@ -144,8 +143,7 @@ public void establishTunnelWithFailingProxyConnectionThrows() {
144
143
"example.com" ,
145
144
443 ,
146
145
clientSslSocketFactory ,
147
- proxyCredentialsProvider ,
148
- false );
146
+ proxyCredentialsProvider );
149
147
fail ("Should have thrown exception for connection failure" );
150
148
} catch (IOException e ) {
151
149
// The implementation wraps the original exception with a descriptive message
@@ -167,7 +165,7 @@ public void bearerTokenIsPassedWhenSet() throws IOException, InterruptedExceptio
167
165
public String getToken () {
168
166
return "token" ;
169
167
}
170
- }, false );
168
+ });
171
169
boolean await = testProxy .getAuthorizationHeaderReceived ().await (5 , TimeUnit .SECONDS );
172
170
assertTrue ("Proxy should have received authorization header" , await );
173
171
}
@@ -182,7 +180,7 @@ public void establishTunnelWithNullCredentialsProviderDoesNotAddAuthHeader() thr
182
180
"example.com" ,
183
181
443 ,
184
182
clientSslSocketFactory ,
185
- null , false );
183
+ null );
186
184
187
185
assertNotNull (tunnelSocket );
188
186
assertTrue (testProxy .getConnectRequestReceived ().await (5 , TimeUnit .SECONDS ));
@@ -207,7 +205,7 @@ public void establishTunnelWithNullBearerTokenDoesNotAddAuthHeader() throws Exce
207
205
public String getToken () {
208
206
return null ;
209
207
}
210
- }, false );
208
+ });
211
209
212
210
assertNotNull (tunnelSocket );
213
211
assertTrue (testProxy .getConnectRequestReceived ().await (5 , TimeUnit .SECONDS ));
@@ -232,7 +230,7 @@ public void establishTunnelWithEmptyBearerTokenDoesNotAddAuthHeader() throws Exc
232
230
public String getToken () {
233
231
return "" ;
234
232
}
235
- }, false );
233
+ });
236
234
237
235
assertNotNull (tunnelSocket );
238
236
assertTrue (testProxy .getConnectRequestReceived ().await (5 , TimeUnit .SECONDS ));
@@ -269,7 +267,7 @@ public void establishTunnelWithMalformedStatusLineThrowsIOException() {
269
267
"example.com" ,
270
268
443 ,
271
269
clientSslSocketFactory ,
272
- null , false ));
270
+ null ));
273
271
274
272
assertNotNull (exception );
275
273
}
@@ -285,7 +283,7 @@ public void establishTunnelWithProxyAuthRequiredThrowsHttpRetryException() {
285
283
"example.com" ,
286
284
443 ,
287
285
clientSslSocketFactory ,
288
- null , false ));
286
+ null ));
289
287
290
288
assertEquals (407 , exception .responseCode ());
291
289
}
0 commit comments