From 16f738359db28c5c2293c05d91038192345f75e1 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Aug 2018 16:30:59 -0700 Subject: [PATCH] Make sure that we actually saw some resource exhaustion if applicable --- test/cpp/end2end/thread_stress_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index 94ad684fe7d..1a5ed28a2cc 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -320,6 +320,10 @@ TYPED_TEST(End2endTest, ThreadStress) { if (error_cnt != 0) { gpr_log(GPR_INFO, "RPC error count: %" PRIu64, error_cnt); } + // If this test allows resource exhaustion, expect that it actually sees some + if (this->common_.AllowExhaustion()) { + EXPECT_GT(error_cnt, static_cast(0)); + } } template