diff options
author | 2015-05-12 14:42:27 -0700 | |
---|---|---|
committer | 2015-05-12 14:42:27 -0700 | |
commit | a0a6b12c85c980aee981c5e61e6962d9f0e4acfa (patch) | |
tree | d25aca434ed5a8be2f85d20006384393eea084f4 /test/core/end2end/dualstack_socket_test.c | |
parent | 79d4c8b08f54f02af526267ff4d4951666fb5fe5 (diff) | |
parent | 54478f8562b812595b0d9102fc4703cdb04a627f (diff) |
Merge branch 'bye-bye-completion-queue-pie' into we-dont-need-no-backup
Diffstat (limited to 'test/core/end2end/dualstack_socket_test.c')
-rw-r--r-- | test/core/end2end/dualstack_socket_test.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index d418ea8732..b54b8ecb3c 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -50,15 +50,10 @@ static gpr_timespec ms_from_now(int ms) { } static void drain_cq(grpc_completion_queue *cq) { - grpc_event *ev; - grpc_completion_type type; + grpc_event ev; do { ev = grpc_completion_queue_next(cq, ms_from_now(5000)); - GPR_ASSERT(ev); - type = ev->type; - grpc_event_finish(ev); - gpr_log(GPR_INFO, "Drained event type %d", type); - } while (type != GRPC_QUEUE_SHUTDOWN); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); } void test_connect(const char *server_host, const char *client_host, int port, @@ -156,7 +151,7 @@ void test_connect(const char *server_host, const char *client_host, int port, grpc_server_request_call(server, &s, &call_details, &request_metadata_recv, cq, cq, tag(101))); - cq_expect_completion(cqv, tag(101), GRPC_OP_OK); + cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); op = ops; @@ -174,8 +169,8 @@ void test_connect(const char *server_host, const char *client_host, int port, GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); - cq_expect_completion(cqv, tag(102), GRPC_OP_OK); - cq_expect_completion(cqv, tag(1), GRPC_OP_OK); + cq_expect_completion(cqv, tag(102), 1); + cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); @@ -187,7 +182,7 @@ void test_connect(const char *server_host, const char *client_host, int port, grpc_call_destroy(s); } else { /* Check for a failed connection. */ - cq_expect_completion(cqv, tag(1), GRPC_OP_OK); + cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED); |