You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by jeking3 <gi...@git.apache.org> on 2015/09/22 22:04:27 UTC
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
GitHub user jeking3 opened a pull request:
https://github.com/apache/thrift/pull/620
THRIFT-3329: fix test incompatibility with boost-1.59
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeking3/thrift bugfix/THRIFT-3329
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/620.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #620
----
commit b2fe68ee92e485178fae100c0812b07473aec8d7
Author: James E. King, III <ji...@simplivity.com>
Date: 2015-09-22T19:51:48Z
THRIFT-3329: fix test incompatibility with boost-1.59
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by hcorg <gi...@git.apache.org>.
Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40461001
--- Diff: lib/cpp/test/TransportTest.cpp ---
@@ -1016,7 +1019,7 @@ struct global_fixture {
}
};
-BOOST_GLOBAL_FIXTURE(global_fixture)
+BOOST_GLOBAL_FIXTURE(global_fixture);
--- End diff --
is this change necessary for boost 1.59? in previous versions it causes warning "extra ;"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40163238
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
- BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be the directory containing the test certificate(s)." << std::endl;
--- End diff --
Starting with boost-1.59 you cannot use assertion test macros outside a test scope. This means you cannot use them in the global fixture. It's a weird choice but that's why I made this change.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by hcorg <gi...@git.apache.org>.
Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40464192
--- Diff: lib/cpp/test/TransportTest.cpp ---
@@ -1016,7 +1019,7 @@ struct global_fixture {
}
};
-BOOST_GLOBAL_FIXTURE(global_fixture)
+BOOST_GLOBAL_FIXTURE(global_fixture);
--- End diff --
blah.... so another ifdef :) (I just hate warnings...)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by hcorg <gi...@git.apache.org>.
Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40177295
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
- BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be the directory containing the test certificate(s)." << std::endl;
--- End diff --
damn, I was using "let's do some checks in fixture constructor" method quite offten... ok, another idea (cleaner than exit(1)) - just throw std::runtime_error with message. Boost has to deal with exceptions, this could make better error info etc.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by hcorg <gi...@git.apache.org>.
Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40156693
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
- BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be the directory containing the test certificate(s)." << std::endl;
--- End diff --
there must be a better way to do it... BOOST_TEST_MESSAGE & BOOST_FAIL?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/thrift/pull/620
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40203751
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
- BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be the directory containing the test certificate(s)." << std::endl;
--- End diff --
Yeah, I was rushing through this yesterday, I'll change to exceptions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by bufferoverflow <gi...@git.apache.org>.
Github user bufferoverflow commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40186729
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
- BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be the directory containing the test certificate(s)." << std::endl;
--- End diff --
I agree with @hcorg, there must be a better alternative from boost test to do this.
the other questions is backward compatibility, miminum version is 1.53.0 right now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request: THRIFT-3329: fix test incompatibility with bo...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40462896
--- Diff: lib/cpp/test/TransportTest.cpp ---
@@ -1016,7 +1019,7 @@ struct global_fixture {
}
};
-BOOST_GLOBAL_FIXTURE(global_fixture)
+BOOST_GLOBAL_FIXTURE(global_fixture);
--- End diff --
boost-1.59 rewrote boost::unit_test and they left the semicolon to the test implementer. With clang-3.8 it won't compile without this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---