From e22bd48cd93cf4c0b777e124631f14bb21073c6c Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 9 May 2017 16:24:31 -0700 Subject: [PATCH] Add cpp test --- test/cpp/server/server_builder_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index 1d9eda17b40..68b2f656bca 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -40,6 +40,8 @@ #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" +#include + namespace grpc { namespace { @@ -87,6 +89,15 @@ TEST(ServerBuilderTest, CreateServerRepeatedPortWithDisallowedReusePort) { nullptr); } +TEST(ServerBuilderTest, CreateServerOnePortWithCronetCompressionWorkaround) { + ServerBuilder() + .RegisterService(&g_service) + .AddListeningPort(g_port, InsecureServerCredentials()) + .EnableWorkaround(GRPC_WORKAROUND_ID_CRONET_COMPRESSION) + .BuildAndStart() + ->Shutdown(); +} + } // namespace } // namespace grpc