Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
vjpai committed Jun 16, 2016
1 parent e44d537 commit 20bf126
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 38 deletions.
2 changes: 1 addition & 1 deletion include/grpc++/impl/codegen/core_codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CoreCodegen : public CoreCodegenInterface {
void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE;
gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE;
void gpr_slice_buffer_add(gpr_slice_buffer* sb,
gpr_slice slice) GRPC_OVERRIDE;
gpr_slice slice) GRPC_OVERRIDE;
void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE;

void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE;
Expand Down
80 changes: 43 additions & 37 deletions test/cpp/end2end/hybrid_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,37 +358,39 @@ TEST_F(HybridEnd2endTest, AsyncEcho) {
SType service;
SetUpServer(&service, nullptr, nullptr);
ResetStub();
std::thread echo_handler_thread(HandleEcho<SType>, &service,
cqs_[0].get(), false);
std::thread echo_handler_thread(HandleEcho<SType>, &service, cqs_[0].get(),
false);
TestAllMethods();
echo_handler_thread.join();
}

TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithAsyncMethod_Echo<TestServiceImpl>>
SType;
SType;
SType service;
SetUpServer(&service, nullptr, nullptr);
ResetStub();
std::thread echo_handler_thread(HandleEcho<SType>, &service, cqs_[0].get(), false);
std::thread request_stream_handler_thread(HandleClientStreaming<SType>, &service, cqs_[1].get());
std::thread echo_handler_thread(HandleEcho<SType>, &service, cqs_[0].get(),
false);
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
TestAllMethods();
echo_handler_thread.join();
request_stream_handler_thread.join();
}

TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
SType;
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
SType;
SType service;
SetUpServer(&service, nullptr, nullptr);
ResetStub();
std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
&service, cqs_[0].get());
&service, cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
&service, cqs_[1].get());
TestAllMethods();
response_stream_handler_thread.join();
request_stream_handler_thread.join();
Expand All @@ -397,16 +399,16 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) {
// Add a second service with one sync method.
TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
SType;
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
SType;
SType service;
TestServiceImplDupPkg dup_service;
SetUpServer(&service, &dup_service, nullptr);
ResetStub();
std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
&service, cqs_[0].get());
&service, cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
&service, cqs_[1].get());
TestAllMethods();
SendEchoToDupService();
response_stream_handler_thread.join();
Expand All @@ -417,16 +419,18 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) {
TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
SType;
SType;
SType service;
duplicate::EchoTestService::AsyncService dup_service;
SetUpServer(&service, &dup_service, nullptr);
ResetStub();
std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
&service, cqs_[0].get());
&service, cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
std::thread echo_handler_thread(HandleEcho<duplicate::EchoTestService::AsyncService>, &dup_service, cqs_[2].get(), true);
&service, cqs_[1].get());
std::thread echo_handler_thread(
HandleEcho<duplicate::EchoTestService::AsyncService>, &dup_service,
cqs_[2].get(), true);
TestAllMethods();
SendEchoToDupService();
response_stream_handler_thread.join();
Expand All @@ -440,23 +444,23 @@ TEST_F(HybridEnd2endTest, GenericEcho) {
SetUpServer(&service, nullptr, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
TestAllMethods();
generic_handler_thread.join();
}

TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithGenericMethod_Echo<TestServiceImpl>>
SType;
SType;
SType service;
AsyncGenericService generic_service;
SetUpServer(&service, nullptr, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
&service, cqs_[1].get());
TestAllMethods();
generic_handler_thread.join();
request_stream_handler_thread.join();
Expand All @@ -465,17 +469,17 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) {
// Add a second service with one sync method.
TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithGenericMethod_Echo<TestServiceImpl>>
SType;
EchoTestService::WithGenericMethod_Echo<TestServiceImpl>>
SType;
SType service;
AsyncGenericService generic_service;
TestServiceImplDupPkg dup_service;
SetUpServer(&service, &dup_service, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
&service, cqs_[1].get());
TestAllMethods();
SendEchoToDupService();
generic_handler_thread.join();
Expand All @@ -486,17 +490,19 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) {
TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithGenericMethod_Echo<TestServiceImpl>>
SType;
SType;
SType service;
AsyncGenericService generic_service;
duplicate::EchoTestService::AsyncService dup_service;
SetUpServer(&service, &dup_service, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
std::thread echo_handler_thread(HandleEcho<duplicate::EchoTestService::AsyncService>, &dup_service, cqs_[2].get(), true);
&service, cqs_[1].get());
std::thread echo_handler_thread(
HandleEcho<duplicate::EchoTestService::AsyncService>, &dup_service,
cqs_[2].get(), true);
TestAllMethods();
SendEchoToDupService();
generic_handler_thread.join();
Expand All @@ -508,17 +514,17 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
EchoTestService::WithGenericMethod_Echo<
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>>
SType;
SType;
SType service;
AsyncGenericService generic_service;
SetUpServer(&service, nullptr, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
&service, cqs_[1].get());
&service, cqs_[1].get());
std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
&service, cqs_[2].get());
&service, cqs_[2].get());
TestAllMethods();
generic_handler_thread.join();
request_stream_handler_thread.join();
Expand All @@ -529,17 +535,17 @@ TEST_F(HybridEnd2endTest, GenericEchoRequestStreamAsyncResponseStream) {
typedef EchoTestService::WithGenericMethod_RequestStream<
EchoTestService::WithGenericMethod_Echo<
EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>>
SType;
SType;
SType service;
AsyncGenericService generic_service;
SetUpServer(&service, nullptr, &generic_service);
ResetStub();
std::thread generic_handler_thread(HandleGenericCall, &generic_service,
cqs_[0].get());
cqs_[0].get());
std::thread generic_handler_thread2(HandleGenericCall, &generic_service,
cqs_[1].get());
cqs_[1].get());
std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
&service, cqs_[2].get());
&service, cqs_[2].get());
TestAllMethods();
generic_handler_thread.join();
generic_handler_thread2.join();
Expand Down

0 comments on commit 20bf126

Please sign in to comment.