diff options
author | Craig Tiller <ctiller@google.com> | 2016-10-12 10:19:46 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-10-12 10:19:46 -0700 |
commit | 9993c8716888eb1eb7b245fda5e76274e39df767 (patch) | |
tree | 7644557819b8b0f58d53303531f257c95d0f0ab7 /test/core/iomgr | |
parent | 81a6ef9d15f2cf426f6d8cadc6d3bb2a3060dee1 (diff) | |
parent | fad04cc4adb9607ff6e0e14fa863e581c5574124 (diff) |
Merge github.com:grpc/grpc into direct-calls
Diffstat (limited to 'test/core/iomgr')
-rw-r--r-- | test/core/iomgr/tcp_server_posix_test.c | 3 | ||||
-rw-r--r-- | test/core/iomgr/udp_server_test.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 6e2d1d0fc9..6b1dd428a1 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -314,11 +314,10 @@ static void test_connect(unsigned n) { GPR_ASSERT(grpc_tcp_server_port_fd(s, 0, 0) >= 0); grpc_tcp_server_unref(&exec_ctx, s); + grpc_exec_ctx_finish(&exec_ctx); /* Weak ref lost. */ GPR_ASSERT(weak_ref.server == NULL); - - grpc_exec_ctx_finish(&exec_ctx); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, 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, |