@@ -36,8 +36,8 @@ class TestURLSession : LoopbackServerTest {
36
36
( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
37
37
( " test_timeoutInterval " , test_timeoutInterval) ,
38
38
( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
39
- ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) , /* temporarily disabled. Needs HTTPServer rework */
40
- ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) , /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
39
+ ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) ,
40
+ ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) ,
41
41
( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
42
42
( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
43
43
( " test_missingContentLengthButStillABody " , test_missingContentLengthButStillABody) ,
@@ -234,10 +234,11 @@ class TestURLSession : LoopbackServerTest {
234
234
XCTFail ( " Intermittent failures on Android " )
235
235
#else
236
236
let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /Peru "
237
- let url = URL ( string: urlString) !
237
+ var urlRequest = URLRequest ( url: URL ( string: urlString) !)
238
+ urlRequest. setValue ( " 2.0 " , forHTTPHeaderField: " X-Pause " )
238
239
let d = DataTask ( with: expectation ( description: " GET \( urlString) : task cancelation " ) )
239
240
d. cancelExpectation = expectation ( description: " GET \( urlString) : task canceled " )
240
- d. run ( with: url )
241
+ d. run ( with: urlRequest )
241
242
d. cancel ( )
242
243
waitForExpectations ( timeout: 12 )
243
244
#endif
0 commit comments