From 66c7560fc48b90abe39ed4e7711816af4d0e851f Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 28 May 2019 11:25:56 -0700 Subject: [PATCH] Fix server interceptors end2end test --- test/cpp/end2end/server_interceptors_end2end_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cpp/end2end/server_interceptors_end2end_test.cc b/test/cpp/end2end/server_interceptors_end2end_test.cc index 68103f7ed34..34409fe375c 100644 --- a/test/cpp/end2end/server_interceptors_end2end_test.cc +++ b/test/cpp/end2end/server_interceptors_end2end_test.cc @@ -120,7 +120,9 @@ class LoggingInterceptor : public experimental::Interceptor { experimental::InterceptionHookPoints::POST_RECV_MESSAGE)) { EchoResponse* resp = static_cast(methods->GetRecvMessage()); - EXPECT_TRUE(resp->message().find("Hello") == 0); + if (resp != nullptr) { + EXPECT_TRUE(resp->message().find("Hello") == 0); + } } if (methods->QueryInterceptionHookPoint( experimental::InterceptionHookPoints::POST_RECV_CLOSE)) {