From 3afb0b263565125a3c2b2a1634ae869b4f055a6d Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Mon, 15 Jul 2019 18:39:57 -0700 Subject: [PATCH] Fix fallback test breaking on mac bazel --- test/cpp/interop/grpclb_fallback_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/cpp/interop/grpclb_fallback_test.cc b/test/cpp/interop/grpclb_fallback_test.cc index 3622482b67d..38474b29749 100644 --- a/test/cpp/interop/grpclb_fallback_test.cc +++ b/test/cpp/interop/grpclb_fallback_test.cc @@ -18,6 +18,8 @@ #include +#include "src/core/lib/iomgr/port.h" + #include #include #include @@ -67,6 +69,7 @@ DEFINE_string( "slow_fallback_after_startup : fallback after startup due to LB/backend " "addresses becoming blackholed;\n"); +#ifdef GRPC_HAVE_TCP_USER_TIMEOUT using grpc::testing::GrpclbRouteType; using grpc::testing::SimpleRequest; using grpc::testing::SimpleResponse; @@ -270,3 +273,11 @@ int main(int argc, char** argv) { abort(); } } +#else +int main(int argc, char** argv) { + grpc::testing::InitTest(&argc, &argv, true); + gpr_log(GPR_ERROR, + "This test requires TCP_USER_TIMEOUT, which isn't available"); + abort(); +} +#endif // GRPC_HAVE_TCP_USER_TIMEOUT