Skip to content

Commit d64ca6e

Browse files
committed
Re-enabling a bunch of http client tests.
1 parent f0e2107 commit d64ca6e

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

Release/tests/functional/http/client/connections_and_errors.cpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ TEST_FIXTURE(uri_address, cancel_before_request)
252252

253253
// This test can't be implemented with our test server so isn't available on WinRT.
254254
#ifndef __cplusplus_winrt
255-
TEST_FIXTURE(uri_address, cancel_after_headers, "Ignore:Apple", "220")
255+
TEST_FIXTURE(uri_address, cancel_after_headers)
256256
{
257257
web::http::experimental::listener::http_listener listener(m_uri);
258258
listener.open().wait();
@@ -280,11 +280,17 @@ TEST_FIXTURE(uri_address, cancel_after_headers, "Ignore:Apple", "220")
280280
ev.set();
281281

282282
VERIFY_THROWS_HTTP_ERROR_CODE(response.extract_string().get(), std::errc::operation_canceled);
283+
284+
// Codeplex 328.
285+
#if !defined(_WIN32)
286+
tests::common::utilities::os_utilities::sleep(1000);
287+
#endif
288+
283289
listener.close().wait();
284290
}
285291
#endif
286292

287-
TEST_FIXTURE(uri_address, cancel_after_body, "Ignore:Apple", "220")
293+
TEST_FIXTURE(uri_address, cancel_after_body)
288294
{
289295
test_http_server::scoped_server scoped(m_uri);
290296
test_http_server * p_server = scoped.server();
@@ -305,7 +311,7 @@ TEST_FIXTURE(uri_address, cancel_after_body, "Ignore:Apple", "220")
305311
response.content_ready().wait();
306312
}
307313

308-
TEST_FIXTURE(uri_address, cancel_with_error, "Ignore:Apple", "220")
314+
TEST_FIXTURE(uri_address, cancel_with_error)
309315
{
310316
test_http_server server(m_uri);
311317
VERIFY_ARE_EQUAL(0, server.open());
@@ -320,7 +326,7 @@ TEST_FIXTURE(uri_address, cancel_with_error, "Ignore:Apple", "220")
320326
VERIFY_THROWS_HTTP_ERROR_CODE(responseTask.get(), std::errc::operation_canceled);
321327
}
322328

323-
TEST_FIXTURE(uri_address, cancel_while_uploading_data, "Ignore:Linux", "220", "Ignore:Apple", "220")
329+
TEST_FIXTURE(uri_address, cancel_while_uploading_data)
324330
{
325331
test_http_server::scoped_server scoped(m_uri);
326332
http_client c(m_uri);
@@ -337,7 +343,7 @@ TEST_FIXTURE(uri_address, cancel_while_uploading_data, "Ignore:Linux", "220", "I
337343

338344
// This test can't be implemented with our test server since it doesn't stream data so isn't avaliable on WinRT.
339345
#ifndef __cplusplus_winrt
340-
TEST_FIXTURE(uri_address, cancel_while_downloading_data, "Ignore:Apple", "220")
346+
TEST_FIXTURE(uri_address, cancel_while_downloading_data)
341347
{
342348
web::http::experimental::listener::http_listener listener(m_uri);
343349
listener.open().wait();
@@ -369,6 +375,11 @@ TEST_FIXTURE(uri_address, cancel_while_downloading_data, "Ignore:Apple", "220")
369375

370376
VERIFY_THROWS_HTTP_ERROR_CODE(response.extract_string().get(), std::errc::operation_canceled);
371377

378+
// Codeplex 328.
379+
#if !defined(_WIN32)
380+
tests::common::utilities::os_utilities::sleep(1000);
381+
#endif
382+
372383
listener.close().wait();
373384
}
374385
#endif

Release/tests/functional/http/client/progress_handler_tests.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ TEST_FIXTURE(uri_address, set_progress_handler_request_timeout)
320320
VERIFY_IS_TRUE(calls >= 2);
321321
}
322322

323-
TEST_FIXTURE(uri_address, upload_nobody_exception, "Ignore:Apple", "900236", "Ignore:Linux", "900236")
323+
TEST_FIXTURE(uri_address, upload_nobody_exception, "Ignore:Apple", "155", "Ignore:Linux", "155")
324324
{
325325
test_http_server::scoped_server scoped(m_uri);
326326
http_client client(m_uri);
@@ -338,6 +338,11 @@ TEST_FIXTURE(uri_address, upload_nobody_exception, "Ignore:Apple", "900236", "Ig
338338
});
339339

340340
VERIFY_THROWS(client.request(msg).get(), std::invalid_argument);
341+
342+
// Codeplex 328.
343+
#if !defined(_WIN32)
344+
tests::common::utilities::os_utilities::sleep(1000);
345+
#endif
341346
}
342347

343348
TEST_FIXTURE(uri_address, download_nobody_exception)
@@ -364,10 +369,7 @@ TEST_FIXTURE(uri_address, download_nobody_exception)
364369
VERIFY_THROWS(client.request(msg).get().content_ready().get(), std::invalid_argument);
365370
}
366371

367-
TEST_FIXTURE(uri_address, data_upload_exception,
368-
"Ignore:Linux", "296",
369-
"Ignore:Apple", "296",
370-
"Ignore:Android", "296")
372+
TEST_FIXTURE(uri_address, data_upload_exception)
371373
{
372374
test_http_server::scoped_server scoped(m_uri);
373375
http_client client(m_uri);
@@ -380,6 +382,11 @@ TEST_FIXTURE(uri_address, data_upload_exception,
380382
});
381383

382384
VERIFY_THROWS(client.request(msg).get(), std::invalid_argument);
385+
386+
// Codeplex 328.
387+
#if !defined(_WIN32)
388+
tests::common::utilities::os_utilities::sleep(1000);
389+
#endif
383390
}
384391

385392
TEST_FIXTURE(uri_address, data_download_exception)

Release/tests/functional/http/client/request_stream_tests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,11 @@ TEST_FIXTURE(uri_address, stream_close_early_with_exception)
379379

380380
// Verify that the responseTask throws the exception set when closing the stream
381381
VERIFY_THROWS(responseTask.get(), test_exception);
382-
382+
383383
// Codeplex 328.
384+
#if !defined(_WIN32)
384385
tests::common::utilities::os_utilities::sleep(1000);
386+
#endif
385387
}
386388
#endif
387389

0 commit comments

Comments
 (0)