diff options
author | Vijay Pai <vpai@google.com> | 2016-01-11 10:30:38 -0800 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2016-01-11 10:30:38 -0800 |
commit | b3a6787bd52a9fe4a68114cbe5cd45926287da17 (patch) | |
tree | 2d52c30933afee569c8fc8dfec46c1d1a91c8060 /test/cpp/end2end | |
parent | 7f34c783c4735ce16c22cd4c92d989d4bb0e2822 (diff) | |
parent | cd92509e40adaae67edd683593da07e9b98fc6d9 (diff) |
Merge pull request #4525 from ctiller/proto_names
Consolidate C++ proto files under src/proto
Diffstat (limited to 'test/cpp/end2end')
-rw-r--r-- | test/cpp/end2end/async_end2end_test.cc | 20 | ||||
-rw-r--r-- | test/cpp/end2end/client_crash_test.cc | 13 | ||||
-rw-r--r-- | test/cpp/end2end/client_crash_test_server.cc | 9 | ||||
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 34 | ||||
-rw-r--r-- | test/cpp/end2end/generic_end2end_test.cc | 8 | ||||
-rw-r--r-- | test/cpp/end2end/mock_test.cc | 14 | ||||
-rw-r--r-- | test/cpp/end2end/server_crash_test.cc | 11 | ||||
-rw-r--r-- | test/cpp/end2end/server_crash_test_client.cc | 8 | ||||
-rw-r--r-- | test/cpp/end2end/shutdown_test.cc | 12 | ||||
-rw-r--r-- | test/cpp/end2end/streaming_throughput_test.cc | 14 | ||||
-rw-r--r-- | test/cpp/end2end/thread_stress_test.cc | 19 | ||||
-rw-r--r-- | test/cpp/end2end/zookeeper_test.cc | 13 |
12 files changed, 84 insertions, 91 deletions
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index af0b7fdb57..dc07eb6777 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -46,16 +46,16 @@ #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 "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" #ifdef GPR_POSIX_SOCKET #include "src/core/iomgr/pollset_posix.h" #endif -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -186,7 +186,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<bool> { build_bad.AddListeningPort(server_address_.str(), grpc::InsecureServerCredentials()); build_bad.RegisterAsyncService(&service_); - grpc::cpp::test::util::TestService::Service sync_service; + grpc::testing::TestService::Service sync_service; build_bad.RegisterService(&sync_service); GPR_ASSERT(build_bad.BuildAndStart() == nullptr); @@ -211,7 +211,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<bool> { void ResetStub() { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } void SendRpc(int num_rpcs) { @@ -249,9 +249,9 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<bool> { } std::unique_ptr<ServerCompletionQueue> cq_; - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; - grpc::cpp::test::util::TestService::AsyncService service_; + grpc::testing::TestService::AsyncService service_; std::ostringstream server_address_; }; @@ -761,8 +761,8 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { TEST_P(AsyncEnd2endTest, UnimplementedRpc) { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - std::unique_ptr<grpc::cpp::test::util::UnimplementedService::Stub> stub; - stub = grpc::cpp::test::util::UnimplementedService::NewStub(channel); + std::unique_ptr<grpc::testing::UnimplementedService::Stub> stub; + stub = grpc::testing::UnimplementedService::NewStub(channel); EchoRequest send_request; EchoResponse recv_response; Status recv_status; diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index 116785bbf2..68c63b2f93 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -44,12 +44,12 @@ #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 "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/subprocess.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; static std::string g_root; @@ -63,8 +63,7 @@ class CrashTest : public ::testing::Test { protected: CrashTest() {} - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> - CreateServerAndStub() { + std::unique_ptr<grpc::testing::TestService::Stub> CreateServerAndStub() { auto port = grpc_pick_unused_port_or_die(); std::ostringstream addr_stream; addr_stream << "localhost:" << port; @@ -73,7 +72,7 @@ class CrashTest : public ::testing::Test { g_root + "/client_crash_test_server", "--address=" + addr, })); GPR_ASSERT(server_); - return grpc::cpp::test::util::TestService::NewStub( + return grpc::testing::TestService::NewStub( CreateChannel(addr, InsecureChannelCredentials())); } diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc index 7ffeecca70..f9a9c187a7 100644 --- a/test/cpp/end2end/client_crash_test_server.cc +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -39,12 +39,12 @@ #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" DEFINE_string(address, "", "Address to bind to"); -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; // In some distros, gflags is in the namespace google, and in some others, // in gflags. This hack is enabling us to find both. @@ -56,8 +56,7 @@ using namespace gflags; namespace grpc { namespace testing { -class ServiceImpl GRPC_FINAL - : public ::grpc::cpp::test::util::TestService::Service { +class ServiceImpl GRPC_FINAL : public ::grpc::testing::TestService::Service { Status BidiStream(ServerContext* context, ServerReaderWriter<EchoResponse, EchoRequest>* stream) GRPC_OVERRIDE { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index bbeac7a30b..28f8a8ec46 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -52,12 +52,12 @@ #include "test/core/end2end/data/ssl_test_data.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" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -196,10 +196,10 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor { const char TestAuthMetadataProcessor::kGoodGuy[] = "Dr Jekyll"; const char TestAuthMetadataProcessor::kIdentityPropName[] = "novel identity"; -class Proxy : public ::grpc::cpp::test::util::TestService::Service { +class Proxy : public ::grpc::testing::TestService::Service { public: Proxy(std::shared_ptr<Channel> channel) - : stub_(grpc::cpp::test::util::TestService::NewStub(channel)) {} + : stub_(grpc::testing::TestService::NewStub(channel)) {} Status Echo(ServerContext* server_context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -209,10 +209,10 @@ class Proxy : public ::grpc::cpp::test::util::TestService::Service { } private: - std::unique_ptr< ::grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr< ::grpc::testing::TestService::Stub> stub_; }; -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: TestServiceImpl() : signal_client_(false), host_() {} explicit TestServiceImpl(const grpc::string& host) @@ -344,7 +344,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { }; class TestServiceImplDupPkg - : public ::grpc::cpp::test::util::duplicate::TestService::Service { + : public ::grpc::testing::duplicate::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -435,12 +435,12 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> { channel_ = CreateChannel(proxyaddr.str(), InsecureChannelCredentials()); } - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } bool is_server_started_; std::shared_ptr<Channel> channel_; - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::unique_ptr<Server> proxy_server_; std::unique_ptr<Proxy> proxy_service_; @@ -451,8 +451,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> { TestServiceImplDupPkg dup_pkg_service_; }; -static void SendRpc(grpc::cpp::test::util::TestService::Stub* stub, - int num_rpcs) { +static void SendRpc(grpc::testing::TestService::Stub* stub, int num_rpcs) { EchoRequest request; EchoResponse response; request.set_message("Hello hello hello hello"); @@ -562,9 +561,8 @@ TEST_P(End2endTest, DiffPackageServices) { EXPECT_EQ(response.message(), request.message()); EXPECT_TRUE(s.ok()); - std::unique_ptr<grpc::cpp::test::util::duplicate::TestService::Stub> - dup_pkg_stub( - grpc::cpp::test::util::duplicate::TestService::NewStub(channel_)); + std::unique_ptr<grpc::testing::duplicate::TestService::Stub> dup_pkg_stub( + grpc::testing::duplicate::TestService::NewStub(channel_)); ClientContext context2; s = dup_pkg_stub->Echo(&context2, request, &response); EXPECT_EQ("no package", response.message()); @@ -783,8 +781,8 @@ TEST_P(End2endTest, ChannelStateTimeout) { // Talking to a non-existing service. TEST_P(End2endTest, NonExistingService) { ResetChannel(); - std::unique_ptr<grpc::cpp::test::util::UnimplementedService::Stub> stub; - stub = grpc::cpp::test::util::UnimplementedService::NewStub(channel_); + std::unique_ptr<grpc::testing::UnimplementedService::Stub> stub; + stub = grpc::testing::UnimplementedService::NewStub(channel_); EchoRequest request; EchoResponse response; diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 350e67b523..f8ceca5f1d 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -50,10 +50,10 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -193,7 +193,7 @@ class GenericEnd2endTest : public ::testing::Test { CompletionQueue cli_cq_; std::unique_ptr<ServerCompletionQueue> srv_cq_; - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<grpc::GenericStub> generic_stub_; std::unique_ptr<Server> server_; AsyncGenericService generic_service_; diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index bd34cfba67..dddd1d0a2e 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -46,12 +46,12 @@ #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 "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; -using grpc::cpp::test::util::TestService; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; +using grpc::testing::TestService; using std::chrono::system_clock; namespace grpc { @@ -245,10 +245,10 @@ class MockTest : public ::testing::Test { void ResetStub() { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::ostringstream server_address_; TestServiceImpl service_; diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 4b6793abe6..87ce6369d2 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -44,12 +44,12 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "test/cpp/util/subprocess.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; static std::string g_root; @@ -59,8 +59,7 @@ namespace testing { namespace { -class ServiceImpl GRPC_FINAL - : public ::grpc::cpp::test::util::TestService::Service { +class ServiceImpl GRPC_FINAL : public ::grpc::testing::TestService::Service { public: ServiceImpl() : bidi_stream_count_(0), response_stream_count_(0) {} diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 2baefcbf42..b349ae7357 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -40,13 +40,13 @@ #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" DEFINE_string(address, "", "Address to connect to"); DEFINE_string(mode, "", "Test mode to use"); -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; // In some distros, gflags is in the namespace google, and in some others, // in gflags. This hack is enabling us to find both. @@ -57,7 +57,7 @@ using namespace gflags; int main(int argc, char** argv) { ParseCommandLineFlags(&argc, &argv, true); - auto stub = grpc::cpp::test::util::TestService::NewStub( + auto stub = grpc::testing::TestService::NewStub( grpc::CreateChannel(FLAGS_address, grpc::InsecureChannelCredentials())); EchoRequest request; diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index b1b18b2a7f..50d4f6dca3 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -46,15 +46,15 @@ #include "src/core/support/env.h" #include "test/core/util/test_config.h" #include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; namespace grpc { namespace testing { -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: explicit TestServiceImpl(gpr_event* ev) : ev_(ev) {} @@ -94,7 +94,7 @@ class ShutdownTest : public ::testing::Test { void ResetStub() { string target = "dns:localhost:" + to_string(port_); channel_ = CreateChannel(target, InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } string to_string(const int number) { @@ -115,7 +115,7 @@ class ShutdownTest : public ::testing::Test { protected: std::shared_ptr<Channel> channel_; - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; bool shutdown_; int port_; diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc index b7e103a1ae..ca563472a7 100644 --- a/test/cpp/end2end/streaming_throughput_test.cc +++ b/test/cpp/end2end/streaming_throughput_test.cc @@ -51,11 +51,11 @@ #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 "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; const char* kLargeString = @@ -99,7 +99,7 @@ const char* kLargeString = namespace grpc { namespace testing { -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: static void BidiStream_Sender( ServerReaderWriter<EchoResponse, EchoRequest>* stream, @@ -161,10 +161,10 @@ class End2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::ostringstream server_address_; TestServiceImpl service_; diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index fb82b96135..8efc645fa3 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -47,11 +47,11 @@ #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 "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; using std::chrono::system_clock; namespace grpc { @@ -74,7 +74,7 @@ void MaybeEchoDeadline(ServerContext* context, const EchoRequest* request, } // namespace -class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { +class TestServiceImpl : public ::grpc::testing::TestService::Service { public: TestServiceImpl() : signal_client_(false) {} @@ -159,7 +159,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { }; class TestServiceImplDupPkg - : public ::grpc::cpp::test::util::duplicate::TestService::Service { + : public ::grpc::testing::duplicate::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -191,10 +191,10 @@ class End2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr<Channel> channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel); + stub_ = grpc::testing::TestService::NewStub(channel); } - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server_; std::ostringstream server_address_; const int kMaxMessageSize_; @@ -202,8 +202,7 @@ class End2endTest : public ::testing::Test { TestServiceImplDupPkg dup_pkg_service_; }; -static void SendRpc(grpc::cpp::test::util::TestService::Stub* stub, - int num_rpcs) { +static void SendRpc(grpc::testing::TestService::Stub* stub, int num_rpcs) { EchoRequest request; EchoResponse response; request.set_message("Hello"); diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index 41482717d2..802df6bb94 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -44,17 +44,16 @@ #include "test/core/util/test_config.h" #include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/core/support/env.h" -using grpc::cpp::test::util::EchoRequest; -using grpc::cpp::test::util::EchoResponse; +using grpc::testing::EchoRequest; +using grpc::testing::EchoResponse; namespace grpc { namespace testing { -class ZookeeperTestServiceImpl - : public ::grpc::cpp::test::util::TestService::Service { +class ZookeeperTestServiceImpl : public ::grpc::testing::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -158,7 +157,7 @@ class ZookeeperTest : public ::testing::Test { void ResetStub() { string target = "zookeeper://" + zookeeper_address_ + "/test"; channel_ = CreateChannel(target, InsecureChannelCredentials()); - stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); + stub_ = grpc::testing::TestService::NewStub(channel_); } string to_string(const int number) { @@ -168,7 +167,7 @@ class ZookeeperTest : public ::testing::Test { } std::shared_ptr<Channel> channel_; - std::unique_ptr<grpc::cpp::test::util::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::TestService::Stub> stub_; std::unique_ptr<Server> server1_; std::unique_ptr<Server> server2_; ZookeeperTestServiceImpl service_; |