diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-05 08:47:12 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-05 08:47:12 -0700 |
commit | 667ca409eda4d2e331a12abdf5fda17e10d3b68e (patch) | |
tree | 6cf5791d7bcf9d4c1fa1d00eda81451597c41179 /test/core/end2end/tests | |
parent | 5fdcbb7fbebe6efd353494a8f316216f13f7cf13 (diff) |
Fix new tests in C core
Diffstat (limited to 'test/core/end2end/tests')
-rw-r--r-- | test/core/end2end/tests/max_message_length.c | 14 | ||||
-rw-r--r-- | test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c | 14 |
2 files changed, 10 insertions, 18 deletions
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 6291f773b3..d2be9afae4 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -67,14 +67,10 @@ static gpr_timespec n_seconds_time(int n) { static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } 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, five_seconds_time()); - GPR_ASSERT(ev); - type = ev->type; - grpc_event_finish(ev); - } while (type != GRPC_QUEUE_SHUTDOWN); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); } static void shutdown_server(grpc_end2end_test_fixture *f) { @@ -168,7 +164,7 @@ static void test_max_message_length(grpc_end2end_test_config config) { &call_details, &request_metadata_recv, f.server_cq, tag(101))); - cq_expect_completion(v_server, tag(101), GRPC_OP_OK); + cq_expect_completion(v_server, tag(101), 1); cq_verify(v_server); op = ops; @@ -177,10 +173,10 @@ static void test_max_message_length(grpc_end2end_test_config config) { op++; GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); - cq_expect_completion(v_server, tag(102), GRPC_OP_OK); + cq_expect_completion(v_server, tag(102), 1); cq_verify(v_server); - cq_expect_completion(v_client, tag(1), GRPC_OP_OK); + cq_expect_completion(v_client, tag(1), 1); cq_verify(v_client); GPR_ASSERT(status == GRPC_STATUS_CANCELLED); diff --git a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c index 538291a5f2..6c24fff02e 100644 --- a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c +++ b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c @@ -69,14 +69,10 @@ static gpr_timespec n_seconds_time(int n) { static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } 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, five_seconds_time()); - GPR_ASSERT(ev); - type = ev->type; - grpc_event_finish(ev); - } while (type != GRPC_QUEUE_SHUTDOWN); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); } static void shutdown_server(grpc_end2end_test_fixture *f) { @@ -151,7 +147,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { &call_details, &request_metadata_recv, f.server_cq, tag(101))); - cq_expect_completion(v_server, tag(101), GRPC_OP_OK); + cq_expect_completion(v_server, tag(101), 1); cq_verify(v_server); op = ops; @@ -168,10 +164,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) { op++; GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); - cq_expect_completion(v_server, tag(102), GRPC_OP_OK); + cq_expect_completion(v_server, tag(102), 1); cq_verify(v_server); - cq_expect_completion(v_client, tag(1), GRPC_OP_OK); + cq_expect_completion(v_client, tag(1), 1); cq_verify(v_client); GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); |