diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-28 18:06:23 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-28 18:06:23 -0800 |
commit | 03412ee9de902e378bc4cea933397ebe5faddc29 (patch) | |
tree | 8976a958d4c9855481425452e578ab4a4e315ad0 /test/cpp | |
parent | 81fc8c9c336fab7a71b448f748a32d680301277c (diff) |
Remove TLS_NO_SUPPORT and always use GPR_TLS. Reorder statements in grpc_init and grpc_shutdown. Add grpc_init and grpc_shutdown in failing test/cpp tests
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/common/channel_arguments_test.cc | 5 | ||||
-rw-r--r-- | test/cpp/grpclb/grpclb_api_test.cc | 6 | ||||
-rw-r--r-- | test/cpp/server/server_builder_test.cc | 7 | ||||
-rw-r--r-- | test/cpp/util/byte_buffer_test.cc | 6 | ||||
-rw-r--r-- | test/cpp/util/slice_test.cc | 6 |
5 files changed, 25 insertions, 5 deletions
diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index d6ed2e5aa2..f330c01281 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -249,5 +249,8 @@ TEST_F(ChannelArgumentsTest, SetUserAgentPrefix) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; } diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index 7b62080b49..a494d6f519 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -17,6 +17,7 @@ */ #include <grpc++/impl/codegen/config.h> +#include <grpc/grpc.h> #include <gtest/gtest.h> #include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" @@ -135,5 +136,8 @@ TEST_F(GrpclbTest, ParseResponseServerList) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; } diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index d18459cec9..694ce549c0 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -22,6 +22,8 @@ #include <grpc++/server.h> #include <grpc++/server_builder.h> +#include <grpc/grpc.h> + #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" @@ -77,5 +79,8 @@ TEST(ServerBuilderTest, CreateServerRepeatedPortWithDisallowedReusePort) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; } diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 8fb51bc663..d603b289c8 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -22,6 +22,7 @@ #include <vector> #include <grpc++/support/slice.h> +#include <grpc/grpc.h> #include <grpc/slice.h> #include <gtest/gtest.h> @@ -109,5 +110,8 @@ TEST_F(ByteBufferTest, SerializationMakesCopy) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; } diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 8a8962d7ee..c2e55f3374 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -18,6 +18,7 @@ #include <grpc++/support/slice.h> +#include <grpc/grpc.h> #include <grpc/slice.h> #include <gtest/gtest.h> @@ -127,5 +128,8 @@ TEST_F(SliceTest, Cslice) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; } |