From 2d485f0396ec3d84b7899526229f41a923434946 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 24 May 2017 00:03:19 +0000 Subject: Fix threading assumptions in test --- test/core/iomgr/endpoint_tests.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index e274796e23..85ba85373b 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -265,7 +265,10 @@ static void read_and_write_test(grpc_endpoint_test_config config, static void inc_on_failure(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + gpr_mu_lock(g_mu); *(int *)arg += (error != GRPC_ERROR_NONE); + GPR_ASSERT(GRPC_LOG_IF_ERROR("kick", grpc_pollset_kick(g_pollset, NULL))); + gpr_mu_unlock(g_mu); } static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count, -- cgit v1.2.3