diff --git a/test/core/util/stack_tracer_test.cc b/test/core/util/stack_tracer_test.cc index 4df0703a6f7..d75df70d3ad 100644 --- a/test/core/util/stack_tracer_test.cc +++ b/test/core/util/stack_tracer_test.cc @@ -22,6 +22,7 @@ #include #include "absl/debugging/symbolize.h" +#include "absl/strings/match.h" #include @@ -31,7 +32,7 @@ TEST(StackTracerTest, Basic) { std::string stack_trace = grpc_core::testing::GetCurrentStackTrace(); gpr_log(GPR_INFO, "stack_trace=%s", stack_trace.c_str()); #if !defined(NDEBUG) && !defined(GPR_MUSL_LIBC_COMPAT) - EXPECT_TRUE(stack_trace.find("Basic") != std::string::npos); + EXPECT_TRUE(absl::StrContains(stack_trace, "Basic")); #endif }