diff options
Diffstat (limited to 'test/cpp/end2end/mock_test.cc')
-rw-r--r-- | test/cpp/end2end/mock_test.cc | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 32130e24e9..b2c6dc39a8 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -33,28 +33,23 @@ #include <thread> -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/dynamic_thread_pool.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; @@ -234,7 +229,7 @@ class TestServiceImpl : public TestService::Service { class MockTest : public ::testing::Test { protected: - MockTest() : thread_pool_(2) {} + MockTest() {} void SetUp() GRPC_OVERRIDE { int port = grpc_pick_unused_port_or_die(); @@ -244,14 +239,13 @@ class MockTest : public ::testing::Test { builder.AddListeningPort(server_address_.str(), InsecureServerCredentials()); builder.RegisterService(&service_); - builder.SetThreadPool(&thread_pool_); server_ = builder.BuildAndStart(); } void TearDown() GRPC_OVERRIDE { server_->Shutdown(); } void ResetStub() { - std::shared_ptr<ChannelInterface> channel = CreateChannel( + std::shared_ptr<Channel> channel = CreateChannel( server_address_.str(), InsecureCredentials(), ChannelArguments()); stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel)); } @@ -260,7 +254,6 @@ class MockTest : public ::testing::Test { std::unique_ptr<Server> server_; std::ostringstream server_address_; TestServiceImpl service_; - DynamicThreadPool thread_pool_; }; // Do one real rpc and one mocked one |