Skip to content

fix client_get_streaming_test #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2018
Merged

Conversation

yhager
Copy link

@yhager yhager commented May 15, 2018

fixes #836

@@ -26,7 +26,7 @@ struct body_handler {
TYPED_TEST_CASE(HTTPClientTest, ClientTypes);

TYPED_TEST(HTTPClientTest, GetStreamingTest) {
typename TypeParam::request request("http://www.boost.org");
typename TypeParam::request request("https://www.boost.org");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @yhager -- we probably want to only build this particular test now if we've enabled HTTPS support. Can you try making this whole test conditional on whether the BOOST_NETWORK_ENABLE_HTTPS macro is defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be much simpler to do:

#if BOOST_NETWORK_ENABLE_HTTPS
TYPED_TEST(HTTPClientTest, GetStreamingTest) {
...
}
#endif

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Pushed the change you requested. Sorry for misunderstanding what you meant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks!

client_get_ready_test)
if (OPENSSL_FOUND)
list(APPEND TESTS client_get_streaming_test)
endif()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is what I meant.

The client_get_streaming_test could have just skipped building the GetStreamingTest by checking whether the BOOST_NETWORK_ENABLE_HTTPS as a preprocessor macro. Please revert this part of the PR.

@@ -26,7 +26,7 @@ struct body_handler {
TYPED_TEST_CASE(HTTPClientTest, ClientTypes);

TYPED_TEST(HTTPClientTest, GetStreamingTest) {
typename TypeParam::request request("http://www.boost.org");
typename TypeParam::request request("https://www.boost.org");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be much simpler to do:

#if BOOST_NETWORK_ENABLE_HTTPS
TYPED_TEST(HTTPClientTest, GetStreamingTest) {
...
}
#endif

Copy link
Member

@deanberris deanberris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- thanks @yhager!

@@ -26,7 +26,7 @@ struct body_handler {
TYPED_TEST_CASE(HTTPClientTest, ClientTypes);

TYPED_TEST(HTTPClientTest, GetStreamingTest) {
typename TypeParam::request request("http://www.boost.org");
typename TypeParam::request request("https://www.boost.org");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks!

@deanberris deanberris merged commit 90847f3 into cpp-netlib:0.13-release May 17, 2018
deanberris pushed a commit that referenced this pull request Jun 14, 2018
* fix client_get_streaming_test

* perform client_get_streaming_test only if SSL is enabled

* test for BOOST_NETWORK_ENABLE_HTTPS for https streaming test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants