diff options
Diffstat (limited to 'test/cpp/end2end/end2end_test.cc')
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 28f8a8ec46..f8027bcf0b 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,9 +34,6 @@ #include <mutex> #include <thread> -#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> @@ -46,14 +43,17 @@ #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <gtest/gtest.h> #include "src/core/security/credentials.h" +#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.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::testing::EchoRequest; @@ -196,10 +196,10 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor { const char TestAuthMetadataProcessor::kGoodGuy[] = "Dr Jekyll"; const char TestAuthMetadataProcessor::kIdentityPropName[] = "novel identity"; -class Proxy : public ::grpc::testing::TestService::Service { +class Proxy : public ::grpc::testing::EchoTestService::Service { public: Proxy(std::shared_ptr<Channel> channel) - : stub_(grpc::testing::TestService::NewStub(channel)) {} + : stub_(grpc::testing::EchoTestService::NewStub(channel)) {} Status Echo(ServerContext* server_context, const EchoRequest* request, EchoResponse* response) GRPC_OVERRIDE { @@ -209,10 +209,10 @@ class Proxy : public ::grpc::testing::TestService::Service { } private: - std::unique_ptr< ::grpc::testing::TestService::Stub> stub_; + std::unique_ptr< ::grpc::testing::EchoTestService::Stub> stub_; }; -class TestServiceImpl : public ::grpc::testing::TestService::Service { +class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { public: TestServiceImpl() : signal_client_(false), host_() {} explicit TestServiceImpl(const grpc::string& host) @@ -344,7 +344,7 @@ class TestServiceImpl : public ::grpc::testing::TestService::Service { }; class TestServiceImplDupPkg - : public ::grpc::testing::duplicate::TestService::Service { + : public ::grpc::testing::duplicate::EchoTestService::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::testing::TestService::NewStub(channel_); + stub_ = grpc::testing::EchoTestService::NewStub(channel_); } bool is_server_started_; std::shared_ptr<Channel> channel_; - std::unique_ptr<grpc::testing::TestService::Stub> stub_; + std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_; std::unique_ptr<Server> server_; std::unique_ptr<Server> proxy_server_; std::unique_ptr<Proxy> proxy_service_; @@ -451,7 +451,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> { TestServiceImplDupPkg dup_pkg_service_; }; -static void SendRpc(grpc::testing::TestService::Stub* stub, int num_rpcs) { +static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs) { EchoRequest request; EchoResponse response; request.set_message("Hello hello hello hello"); @@ -561,8 +561,8 @@ TEST_P(End2endTest, DiffPackageServices) { EXPECT_EQ(response.message(), request.message()); EXPECT_TRUE(s.ok()); - std::unique_ptr<grpc::testing::duplicate::TestService::Stub> dup_pkg_stub( - grpc::testing::duplicate::TestService::NewStub(channel_)); + std::unique_ptr<grpc::testing::duplicate::EchoTestService::Stub> dup_pkg_stub( + grpc::testing::duplicate::EchoTestService::NewStub(channel_)); ClientContext context2; s = dup_pkg_stub->Echo(&context2, request, &response); EXPECT_EQ("no package", response.message()); |