diff options
Diffstat (limited to 'test/cpp')
23 files changed, 53 insertions, 53 deletions
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index a30c841216..7006ebb83a 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -39,7 +39,7 @@ #include "test/cpp/util/echo.grpc.pb.h" #include <grpc++/async_unary_call.h> #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -136,7 +136,7 @@ class AsyncEnd2endTest : public ::testing::Test { } 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)); } @@ -672,7 +672,7 @@ TEST_F(AsyncEnd2endTest, ServerCheckDone) { } TEST_F(AsyncEnd2endTest, UnimplementedRpc) { - std::shared_ptr<ChannelInterface> channel = CreateChannel( + std::shared_ptr<Channel> channel = CreateChannel( server_address_.str(), InsecureCredentials(), ChannelArguments()); std::unique_ptr<grpc::cpp::test::util::UnimplementedService::Stub> stub; stub = diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index 1c2a5c3a36..89708a2ef6 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -36,7 +36,7 @@ #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++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 350b10726f..fc4e88c2a7 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -41,7 +41,7 @@ #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++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -106,7 +106,7 @@ bool CheckIsLocalhost(const grpc::string& addr) { class Proxy : public ::grpc::cpp::test::util::TestService::Service { public: - Proxy(std::shared_ptr<ChannelInterface> channel) + Proxy(std::shared_ptr<Channel> channel) : stub_(grpc::cpp::test::util::TestService::NewStub(channel)) {} Status Echo(ServerContext* server_context, const EchoRequest* request, @@ -319,7 +319,7 @@ class End2endTest : public ::testing::TestWithParam<bool> { stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_)); } - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::unique_ptr<Server> proxy_server_; @@ -571,7 +571,7 @@ TEST_F(End2endTest, DiffPackageServices) { TEST_F(End2endTest, BadCredentials) { std::shared_ptr<Credentials> bad_creds = ServiceAccountCredentials("", "", 1); EXPECT_EQ(static_cast<Credentials*>(nullptr), bad_creds.get()); - std::shared_ptr<ChannelInterface> channel = + std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), bad_creds, ChannelArguments()); std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub( grpc::cpp::test::util::TestService::NewStub(channel)); diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 3120cec938..b817198fa7 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -41,7 +41,7 @@ #include <grpc++/async_unary_call.h> #include <grpc++/byte_buffer.h> #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -127,7 +127,7 @@ class GenericEnd2endTest : public ::testing::Test { } void ResetStub() { - std::shared_ptr<ChannelInterface> channel = CreateChannel( + std::shared_ptr<Channel> channel = CreateChannel( server_address_.str(), InsecureCredentials(), ChannelArguments()); generic_stub_.reset(new GenericStub(channel)); } diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 32130e24e9..96b6ecbd6e 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -38,7 +38,7 @@ #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++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -251,7 +251,7 @@ class MockTest : public ::testing::Test { 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)); } diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 5c7bb4e653..2688f2c4ea 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -36,7 +36,7 @@ #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++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 1da4f05c8d..52dce8f28e 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -38,7 +38,7 @@ #include <gflags/gflags.h> #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index ff9c945c7c..e59a77dc9e 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -39,7 +39,7 @@ #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++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -197,7 +197,7 @@ class End2endTest : public ::testing::Test { 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)); } diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index f5eba66cb2..d7fac3d07e 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -36,7 +36,7 @@ #include "test/cpp/util/echo.grpc.pb.h" #include "src/core/support/env.h" #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -170,7 +170,7 @@ class ZookeeperTest : public ::testing::Test { return strs.str(); } - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; std::unique_ptr<Server> server1_; std::unique_ptr<Server> server2_; diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 48143b2e53..d9e4f1ba6a 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -38,7 +38,7 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> #include <gflags/gflags.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/status.h> #include <grpc++/stream.h> diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index da5627de95..be652a4add 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -44,7 +44,7 @@ #include <grpc/support/log.h> #include <gflags/gflags.h> #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> #include <grpc++/stream.h> @@ -102,7 +102,7 @@ grpc::string GetOauth2AccessToken() { return access_token; } -std::shared_ptr<ChannelInterface> CreateChannelForTestCase( +std::shared_ptr<Channel> CreateChannelForTestCase( const grpc::string& test_case) { GPR_ASSERT(FLAGS_server_port); const int host_port_buf_size = 1024; diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index edc69e90ac..d4c14433a9 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -37,7 +37,7 @@ #include <memory> #include <grpc++/config.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include "src/core/surface/call.h" @@ -48,7 +48,7 @@ grpc::string GetServiceAccountJsonKey(); grpc::string GetOauth2AccessToken(); -std::shared_ptr<ChannelInterface> CreateChannelForTestCase( +std::shared_ptr<Channel> CreateChannelForTestCase( const grpc::string& test_case); class InteropClientContextInspector { diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 5ed14d556a..c73505c670 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -42,7 +42,7 @@ #include <grpc/support/log.h> #include <grpc/support/string_util.h> #include <grpc/support/useful.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/credentials.h> #include <grpc++/status.h> @@ -84,7 +84,7 @@ CompressionType GetInteropCompressionTypeFromCompressionAlgorithm( } } // namespace -InteropClient::InteropClient(std::shared_ptr<ChannelInterface> channel) +InteropClient::InteropClient(std::shared_ptr<Channel> channel) : channel_(channel) {} void InteropClient::AssertOkOrPrintErrorStatus(const Status& s) { diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index d6fb9bff39..354c2c6195 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -36,7 +36,7 @@ #include <memory> #include <grpc/grpc.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/status.h> #include "test/proto/messages.grpc.pb.h" @@ -45,10 +45,10 @@ namespace testing { class InteropClient { public: - explicit InteropClient(std::shared_ptr<ChannelInterface> channel); + explicit InteropClient(std::shared_ptr<Channel> channel); ~InteropClient() {} - void Reset(std::shared_ptr<ChannelInterface> channel) { channel_ = channel; } + void Reset(std::shared_ptr<Channel> channel) { channel_ = channel; } void DoEmpty(); void DoLargeUnary(); @@ -82,7 +82,7 @@ class InteropClient { void PerformLargeUnary(SimpleRequest* request, SimpleResponse* response); void AssertOkOrPrintErrorStatus(const Status& s); - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; }; } // namespace testing diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index 65f098050e..675c6ff073 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -37,7 +37,7 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> #include <gflags/gflags.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/status.h> #include "test/cpp/util/create_test_channel.h" @@ -50,7 +50,7 @@ DEFINE_int32(server_control_port, 0, "Server port for control rpcs."); DEFINE_int32(server_retry_port, 0, "Server port for testing reconnection."); DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); -using grpc::ChannelInterface; +using grpc::Channel; using grpc::ClientContext; using grpc::CreateTestChannel; using grpc::Status; @@ -78,7 +78,7 @@ int main(int argc, char** argv) { gpr_log(GPR_INFO, "Starting connections with retries."); server_address.str(""); server_address << FLAGS_server_host << ':' << FLAGS_server_retry_port; - std::shared_ptr<ChannelInterface> retry_channel = + std::shared_ptr<Channel> retry_channel = CreateTestChannel(server_address.str(), true); // About 13 retries. const int kDeadlineSeconds = 540; diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 1c4f46328f..5395d02e32 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -125,11 +125,11 @@ class Client { channel_ = CreateTestChannel(target, config.enable_ssl()); stub_ = TestService::NewStub(channel_); } - ChannelInterface* get_channel() { return channel_.get(); } + Channel* get_channel() { return channel_.get(); } TestService::Stub* get_stub() { return stub_.get(); } private: - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; std::unique_ptr<TestService::Stub> stub_; }; std::vector<ClientChannelInfo> channels_; diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h index 7a9d86d3a6..3433cd88d1 100644 --- a/test/cpp/qps/perf_db_client.h +++ b/test/cpp/qps/perf_db_client.h @@ -38,7 +38,7 @@ #include <grpc/grpc.h> #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -65,7 +65,7 @@ class PerfDbClient { client_user_time_ = DBL_MIN; } - void init(std::shared_ptr<ChannelInterface> channel) { + void init(std::shared_ptr<Channel> channel) { stub_ = PerfDbTransfer::NewStub(channel); } diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index ac88910a01..d0a300f511 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -36,7 +36,7 @@ #include <iostream> #include <grpc++/byte_buffer.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/generic_stub.h> #include <grpc++/status.h> @@ -52,7 +52,7 @@ namespace { void* tag(int i) { return (void*)(gpr_intptr)i; } } // namespace -Status CliCall::Call(std::shared_ptr<grpc::ChannelInterface> channel, +Status CliCall::Call(std::shared_ptr<grpc::Channel> channel, const grpc::string& method, const grpc::string& request, grpc::string* response, const MetadataContainer& metadata, MetadataContainer* server_initial_metadata, diff --git a/test/cpp/util/cli_call.h b/test/cpp/util/cli_call.h index 8d114c9cb5..46b5dd3e4f 100644 --- a/test/cpp/util/cli_call.h +++ b/test/cpp/util/cli_call.h @@ -36,7 +36,7 @@ #include <map> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/config.h> #include <grpc++/status.h> @@ -46,7 +46,7 @@ namespace testing { class CliCall GRPC_FINAL { public: typedef std::multimap<grpc::string, grpc::string> MetadataContainer; - static Status Call(std::shared_ptr<grpc::ChannelInterface> channel, + static Status Call(std::shared_ptr<grpc::Channel> channel, const grpc::string& method, const grpc::string& request, grpc::string* response, const MetadataContainer& metadata, MetadataContainer* server_initial_metadata, diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 848a3aee57..146e96720f 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -35,7 +35,7 @@ #include "test/cpp/util/cli_call.h" #include "test/cpp/util/echo.grpc.pb.h" #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -97,7 +97,7 @@ class CliCallTest : public ::testing::Test { stub_ = std::move(grpc::cpp::test::util::TestService::NewStub(channel_)); } - std::shared_ptr<ChannelInterface> channel_; + std::shared_ptr<Channel> channel_; std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::ostringstream server_address_; diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index dc48fa2d87..43e719ef6b 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -55,7 +55,7 @@ namespace grpc { // CreateTestChannel("test.google.com:443", "", true, true, creds); // same as above // CreateTestChannel("", "test.google.com:443", true, true, creds); -std::shared_ptr<ChannelInterface> CreateTestChannel( +std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots, const std::shared_ptr<Credentials>& creds) { @@ -80,7 +80,7 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( } } -std::shared_ptr<ChannelInterface> CreateTestChannel( +std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots) { return CreateTestChannel(server, override_hostname, enable_ssl, @@ -88,8 +88,8 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( } // Shortcut for end2end and interop tests. -std::shared_ptr<ChannelInterface> CreateTestChannel(const grpc::string& server, - bool enable_ssl) { +std::shared_ptr<Channel> CreateTestChannel(const grpc::string& server, + bool enable_ssl) { return CreateTestChannel(server, "foo.test.google.fr", enable_ssl, false); } diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index 5f2609ddd8..129cc746f9 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -40,16 +40,16 @@ #include <grpc++/credentials.h> namespace grpc { -class ChannelInterface; +class Channel; -std::shared_ptr<ChannelInterface> CreateTestChannel(const grpc::string& server, - bool enable_ssl); +std::shared_ptr<Channel> CreateTestChannel(const grpc::string& server, + bool enable_ssl); -std::shared_ptr<ChannelInterface> CreateTestChannel( +std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots); -std::shared_ptr<ChannelInterface> CreateTestChannel( +std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots, const std::shared_ptr<Credentials>& creds); diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 3c3baeb769..15c56a352c 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -67,7 +67,7 @@ #include "test/cpp/util/cli_call.h" #include "test/cpp/util/test_config.h" #include <grpc++/channel_arguments.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> @@ -154,7 +154,7 @@ int main(int argc, char** argv) { creds = grpc::SslCredentials(grpc::SslCredentialsOptions()); } } - std::shared_ptr<grpc::ChannelInterface> channel = + std::shared_ptr<grpc::Channel> channel = grpc::CreateChannel(server_address, creds, grpc::ChannelArguments()); grpc::string response; |