diff options
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); |