@@ -28,8 +28,8 @@ class TestURLSession : LoopbackServerTest {
28
28
( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
29
29
( " test_timeoutInterval " , test_timeoutInterval) ,
30
30
( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
31
- ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) , /* temporarily disabled. Needs HTTPServer rework */
32
- ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) , /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
31
+ ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) ,
32
+ ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) ,
33
33
( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
34
34
( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
35
35
( " test_missingContentLengthButStillABody " , test_missingContentLengthButStillABody) ,
@@ -226,10 +226,11 @@ class TestURLSession : LoopbackServerTest {
226
226
XCTFail ( " Intermittent failures on Android " )
227
227
#else
228
228
let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /Peru "
229
- let url = URL ( string: urlString) !
229
+ var urlRequest = URLRequest ( url: URL ( string: urlString) !)
230
+ urlRequest. setValue ( " 2.0 " , forHTTPHeaderField: " X-Pause " )
230
231
let d = DataTask ( with: expectation ( description: " GET \( urlString) : task cancelation " ) )
231
232
d. cancelExpectation = expectation ( description: " GET \( urlString) : task canceled " )
232
- d. run ( with: url )
233
+ d. run ( with: urlRequest )
233
234
d. cancel ( )
234
235
waitForExpectations ( timeout: 12 )
235
236
#endif
0 commit comments