diff options
author | 2016-10-11 16:06:22 -0700 | |
---|---|---|
committer | 2016-10-11 16:06:22 -0700 | |
commit | a03a8c4d78b8aebc530411e93d867a6e2ce76125 (patch) | |
tree | bdc93e81e9f2b20ccbd271df02138d829a582e0c /test/core | |
parent | fbfb05acc8c97487d75404afe92661d1e6384dd7 (diff) | |
parent | 517503746c65944e9783b00ef004c403b6bd18a9 (diff) |
Merge pull request #8333 from rjshade/orphan_calls
Check for the correct number of orphan callbacks in udp_server_test
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/iomgr/udp_server_test.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 2a30427504..71d2fb5bd4 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -131,8 +131,9 @@ static void test_no_op_with_port_and_start(void) { grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); - /* The server had a single FD, which should have been orphaned. */ - GPR_ASSERT(g_number_of_orphan_calls == 1); + /* The server had a single FD, which is orphaned once in * + * deactivated_all_ports, and once in grpc_udp_server_destroy. */ + GPR_ASSERT(g_number_of_orphan_calls == 2); } static void test_receive(int number_of_clients) { @@ -196,8 +197,9 @@ static void test_receive(int number_of_clients) { grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); - /* The server had a single FD, which should have been orphaned. */ - GPR_ASSERT(g_number_of_orphan_calls == 1); + /* The server had a single FD, which is orphaned once in * + * deactivated_all_ports, and once in grpc_udp_server_destroy. */ + GPR_ASSERT(g_number_of_orphan_calls == 2); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, |