Remove ChannelInterface and replace it with Channel
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index a30c841..7006ebb 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 @@
}
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, 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 1c2a5c3..89708a2 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 350b107..fc4e88c 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 @@
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 @@
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, 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 3120cec..b817198 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 @@
}
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 32130e2..96b6ecb 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 @@
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 5c7bb4e..2688f2c 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 1da4f05..52dce8f 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 ff9c945..e59a77d 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 @@
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 f5eba66..d7fac3d 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 @@
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 48143b2..d9e4f1b 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 b8a222c..91c8dbc 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>
@@ -103,7 +103,7 @@
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 000374a..3b46d87 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>
namespace grpc {
namespace testing {
@@ -46,7 +46,7 @@
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 5ed14d5..c73505c 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 @@
}
} // 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 d6fb9bf..354c2c6 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 @@
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 @@
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 65f0980..675c6ff 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_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 @@
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 1c4f463..5395d02 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -125,11 +125,11 @@
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 7a9d86d..3433cd8 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 @@
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 ac88910..d0a300f 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 @@
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 8d114c9..46b5dd3 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 @@
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 848a3ae..146e967 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 @@
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 dc48fa2..43e719e 100644
--- a/test/cpp/util/create_test_channel.cc
+++ b/test/cpp/util/create_test_channel.cc
@@ -55,7 +55,7 @@
// 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<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 @@
}
// 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 5f2609d..129cc74 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 3c3baeb..15c56a3 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 @@
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;