diff options
author | Craig Tiller <ctiller@google.com> | 2015-07-31 14:19:49 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-07-31 14:19:49 -0700 |
commit | 4719ad01d5fabdbbc0034b2ea32a60b4c90b34bb (patch) | |
tree | 45aaf6b186538a9b59c71b049a6f8dae5499f96e /test/core/iomgr/tcp_client_posix_test.c | |
parent | 91e3d0601224c2c8f3906de4d21179968f4293d2 (diff) | |
parent | 8683b78a6dcd3e97c545756b1c4772b2fa112092 (diff) |
Merge branch 'primary-goat-whisperer' into the-test-be-sleepy
Diffstat (limited to 'test/core/iomgr/tcp_client_posix_test.c')
-rw-r--r-- | test/core/iomgr/tcp_client_posix_test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index 38b7b5909d..07bbe1f402 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -56,7 +56,7 @@ static gpr_timespec test_deadline(void) { static void finish_connection() { gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); g_connections_complete++; - grpc_pollset_kick(&g_pollset); + grpc_pollset_kick(&g_pollset, NULL); gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); } @@ -111,7 +111,8 @@ void test_succeeds(void) { gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); while (g_connections_complete == connections_complete_before) { - grpc_pollset_work(&g_pollset, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)); + grpc_pollset_worker worker; + grpc_pollset_work(&g_pollset, &worker, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)); } gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); @@ -140,7 +141,8 @@ void test_fails(void) { /* wait for the connection callback to finish */ while (g_connections_complete == connections_complete_before) { - grpc_pollset_work(&g_pollset, test_deadline()); + grpc_pollset_worker worker; + grpc_pollset_work(&g_pollset, &worker, test_deadline()); } gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); @@ -199,6 +201,7 @@ void test_times_out(void) { gpr_now(connect_deadline.clock_type)) > 0) { int is_after_deadline = gpr_time_cmp(connect_deadline, gpr_now(GPR_CLOCK_MONOTONIC)) <= 0; + grpc_pollset_worker worker; if (is_after_deadline && gpr_time_cmp(gpr_time_add(connect_deadline, gpr_time_from_seconds(1, GPR_TIMESPAN)), @@ -208,7 +211,7 @@ void test_times_out(void) { GPR_ASSERT(g_connections_complete == connections_complete_before + is_after_deadline); } - grpc_pollset_work(&g_pollset, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10)); + grpc_pollset_work(&g_pollset, &worker, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10)); } gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); |