diff options
author | Craig Tiller <ctiller@google.com> | 2016-05-24 06:55:47 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-05-24 06:55:47 -0700 |
commit | ccc8ec54b0cf75f52c0a19a2674d6a6bc8e93743 (patch) | |
tree | 5a6fd5fedbac12b80b46b1208a5d4b3f95ba1b90 /test/core/surface | |
parent | 34fc500cfa0b3f282bbcde385f1f337fff5ae213 (diff) | |
parent | 48abdde19722a9d24d4f590b9d197db29f498ed1 (diff) |
Merge branch 'error' into reuse_port
Diffstat (limited to 'test/core/surface')
-rw-r--r-- | test/core/surface/completion_queue_test.c | 7 | ||||
-rw-r--r-- | test/core/surface/concurrent_connectivity_test.c | 1 | ||||
-rw-r--r-- | test/core/surface/server_test.c | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index 10087780ef..ab74c65b9e 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -63,6 +63,12 @@ static void test_no_op(void) { shutdown_and_destroy(grpc_completion_queue_create(NULL)); } +static void test_pollset_conversion(void) { + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + GPR_ASSERT(grpc_cq_from_pollset(grpc_cq_pollset(cq)) == cq); + shutdown_and_destroy(cq); +} + static void test_wait_empty(void) { grpc_completion_queue *cc; grpc_event event; @@ -409,6 +415,7 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_no_op(); + test_pollset_conversion(); test_wait_empty(); test_shutdown_then_next_polling(); test_shutdown_then_next_with_timeout(); diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 6d7d0413b2..ec307e9428 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -96,6 +96,7 @@ void server_thread(void *vargs) { } static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, + grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { struct server_thread_args *args = (struct server_thread_args *)vargs; (void)acceptor; diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index d1e646a9f1..e175e8f87f 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -67,12 +67,14 @@ void test_register_method_fail(void) { void test_request_call_on_no_server_cq(void) { grpc_completion_queue *cc = grpc_completion_queue_create(NULL); + grpc_server *server = grpc_server_create(NULL, NULL); GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE == - grpc_server_request_call(NULL, NULL, NULL, NULL, cc, cc, NULL)); + grpc_server_request_call(server, NULL, NULL, NULL, cc, cc, NULL)); GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE == - grpc_server_request_registered_call(NULL, NULL, NULL, NULL, NULL, + grpc_server_request_registered_call(server, NULL, NULL, NULL, NULL, NULL, cc, cc, NULL)); grpc_completion_queue_destroy(cc); + grpc_server_destroy(server); } void test_bind_server_twice(void) { |