From 5a05f51a1c7de7f17bef1ce904afba67426992bb Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 13 Jan 2016 22:43:20 -0800 Subject: Rename TestService to EchoTestService to prevent name-conflict with 'TestService' in test.proto --- test/cpp/end2end/mock_test.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/cpp/end2end/mock_test.cc') diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index dddd1d0a2e..36ff6835d7 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -51,7 +51,7 @@ using grpc::testing::EchoRequest; using grpc::testing::EchoResponse; -using grpc::testing::TestService; +using grpc::testing::EchoTestService; using std::chrono::system_clock; namespace grpc { @@ -98,7 +98,7 @@ class MockClientReaderWriter GRPC_FINAL }; // Mocked stub. -class MockStub : public TestService::StubInterface { +class MockStub : public EchoTestService::StubInterface { public: MockStub() {} ~MockStub() {} @@ -154,7 +154,7 @@ class MockStub : public TestService::StubInterface { class FakeClient { public: - explicit FakeClient(TestService::StubInterface* stub) : stub_(stub) {} + explicit FakeClient(EchoTestService::StubInterface* stub) : stub_(stub) {} void DoEcho() { ClientContext context; @@ -197,13 +197,13 @@ class FakeClient { EXPECT_TRUE(s.ok()); } - void ResetStub(TestService::StubInterface* stub) { stub_ = stub; } + void ResetStub(EchoTestService::StubInterface* stub) { stub_ = stub; } private: - TestService::StubInterface* stub_; + EchoTestService::StubInterface* stub_; }; -class TestServiceImpl : public TestService::Service { +class TestServiceImpl : public EchoTestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -245,10 +245,10 @@ class MockTest : public ::testing::Test { void ResetStub() { std::shared_ptr channel = CreateChannel(server_address_.str(), InsecureChannelCredentials()); - stub_ = grpc::testing::TestService::NewStub(channel); + stub_ = grpc::testing::EchoTestService::NewStub(channel); } - std::unique_ptr stub_; + std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; TestServiceImpl service_; -- cgit v1.2.3