aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-12 14:42:27 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-12 14:42:27 -0700
commita0a6b12c85c980aee981c5e61e6962d9f0e4acfa (patch)
treed25aca434ed5a8be2f85d20006384393eea084f4 /test/core/end2end/tests
parent79d4c8b08f54f02af526267ff4d4951666fb5fe5 (diff)
parent54478f8562b812595b0d9102fc4703cdb04a627f (diff)
Merge branch 'bye-bye-completion-queue-pie' into we-dont-need-no-backup
Diffstat (limited to 'test/core/end2end/tests')
-rw-r--r--test/core/end2end/tests/bad_hostname.c10
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c14
-rw-r--r--test/core/end2end/tests/cancel_after_accept_and_writes_closed.c14
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c10
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c10
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c8
-rw-r--r--test/core/end2end/tests/census_simple_request.c14
-rw-r--r--test/core/end2end/tests/disappearing_server.c14
-rw-r--r--test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c14
-rw-r--r--test/core/end2end/tests/early_server_shutdown_finishes_tags.c10
-rw-r--r--test/core/end2end/tests/empty_batch.c10
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.c16
-rw-r--r--test/core/end2end/tests/invoke_large_request.c14
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c42
-rw-r--r--test/core/end2end/tests/max_message_length.c14
-rw-r--r--test/core/end2end/tests/no_op.c8
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c24
-rw-r--r--test/core/end2end/tests/registered_call.c14
-rw-r--r--test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c14
-rw-r--r--test/core/end2end/tests/request_response_with_metadata_and_payload.c14
-rw-r--r--test/core/end2end/tests/request_response_with_payload.c14
-rw-r--r--test/core/end2end/tests/request_response_with_payload_and_call_creds.c16
-rw-r--r--test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c17
-rw-r--r--test/core/end2end/tests/request_with_large_metadata.c14
-rw-r--r--test/core/end2end/tests/request_with_payload.c14
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c14
-rw-r--r--test/core/end2end/tests/simple_request.c14
-rw-r--r--test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c14
28 files changed, 149 insertions, 256 deletions
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index d9971a616e..726bada7bf 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -68,14 +68,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) {
@@ -140,7 +136,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1)));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNAUTHENTICATED);
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 8ae53b77b2..db6d0899fe 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.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) {
@@ -160,7 +156,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(2)));
- cq_expect_completion(cqv, tag(2), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(2), 1);
cq_verify(cqv);
op = ops;
@@ -180,8 +176,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c));
- cq_expect_completion(cqv, tag(3), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(3), 1);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status);
diff --git a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
index 4b7fdd62b3..0162df7d28 100644
--- a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
+++ b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.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) {
@@ -162,7 +158,7 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(2)));
- cq_expect_completion(cqv, tag(2), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(2), 1);
cq_verify(cqv);
op = ops;
@@ -182,8 +178,8 @@ static void test_cancel_after_accept_and_writes_closed(
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c));
- cq_expect_completion(cqv, tag(3), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(3), 1);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status);
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index 7ee4350e11..cf12269d00 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -68,14 +68,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) {
@@ -156,7 +152,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status);
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 8a53e18535..19d3badde1 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -66,14 +66,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) {
@@ -153,7 +149,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, test_ops, tag(1)));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_CANCELLED);
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index 467a621db9..679b137521 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -65,14 +65,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) {
diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c
index 4f18eabab3..4f6c57c4ed 100644
--- a/test/core/end2end/tests/census_simple_request.c
+++ b/test/core/end2end/tests/census_simple_request.c
@@ -74,14 +74,10 @@ static void shutdown_client(grpc_end2end_test_fixture *f) {
}
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, n_seconds_time(5));
- GPR_ASSERT(ev);
- type = ev->type;
- grpc_event_finish(ev);
- } while (type != GRPC_QUEUE_SHUTDOWN);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
static void end_test(grpc_end2end_test_fixture *f) {
@@ -141,7 +137,7 @@ static void test_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -158,8 +154,8 @@ static void test_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(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);
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index 1e5560f40f..9bcc79d34d 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -54,14 +54,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) {
@@ -132,7 +128,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
grpc_server_request_call(f->server, &s, &call_details,
&request_metadata_recv, f->cq,
f->cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
/* should be able to shut down the server early
@@ -153,8 +149,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
op++;
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);
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
index 64f2f61bba..3efbf6add8 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
+++ b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
@@ -66,14 +66,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) {
@@ -147,7 +143,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -159,8 +155,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
/* shutdown and destroy the server */
shutdown_server(&f);
- 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_UNAVAILABLE);
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
index b193820804..c52e54b135 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
+++ b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
@@ -66,14 +66,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) {
@@ -116,7 +112,7 @@ static void test_early_server_shutdown_finishes_tags(
&request_metadata_recv, f.cq,
f.cq, tag(101)));
grpc_server_shutdown(f.server);
- cq_expect_completion(cqv, tag(101), GRPC_OP_ERROR);
+ cq_expect_completion(cqv, tag(101), 0);
cq_verify(cqv);
GPR_ASSERT(s == NULL);
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c
index b3f24aab8b..f1c3fb259f 100644
--- a/test/core/end2end/tests/empty_batch.c
+++ b/test/core/end2end/tests/empty_batch.c
@@ -68,14 +68,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) {
@@ -111,7 +107,7 @@ static void empty_batch_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, op, 0, tag(1)));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
grpc_call_destroy(c);
diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c
index b5a3906dc5..70a06555fb 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.c
+++ b/test/core/end2end/tests/graceful_server_shutdown.c
@@ -66,14 +66,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) {
@@ -146,7 +142,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
/* shutdown and destroy the server */
@@ -167,12 +163,12 @@ static void test_early_server_shutdown_finishes_inflight_calls(
op++;
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(102), 1);
cq_verify(cqv);
grpc_call_destroy(s);
- cq_expect_server_shutdown(cqv, tag(0xdead));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(0xdead), 1);
+ cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index 6fbd78d1a1..d4035d0674 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -64,14 +64,10 @@ static gpr_timespec n_seconds_time(int n) {
}
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, n_seconds_time(5));
- 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) {
@@ -164,7 +160,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -187,8 +183,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
op++;
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);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 15b3c86f98..57300a0191 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -66,14 +66,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) {
@@ -144,7 +140,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -161,8 +157,8 @@ 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(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);
@@ -194,7 +190,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
int live_call;
gpr_timespec deadline;
cq_verifier *cqv;
- grpc_event *ev;
+ grpc_event ev;
grpc_call_details call_details;
grpc_metadata_array request_metadata_recv;
grpc_metadata_array initial_metadata_recv1;
@@ -297,26 +293,26 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
got_client_start = 0;
got_server_start = 0;
+ live_call = -1;
while (!got_client_start || !got_server_start) {
ev = grpc_completion_queue_next(f.cq,
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3));
- GPR_ASSERT(ev);
- GPR_ASSERT(ev->type == GRPC_OP_COMPLETE);
- GPR_ASSERT(ev->data.op_complete == GRPC_OP_OK);
- if (ev->tag == tag(101)) {
+ GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
+ GPR_ASSERT(ev.success);
+ if (ev.tag == tag(101)) {
GPR_ASSERT(!got_server_start);
got_server_start = 1;
} else {
GPR_ASSERT(!got_client_start);
- GPR_ASSERT(ev->tag == tag(301) || ev->tag == tag(401));
+ GPR_ASSERT(ev.tag == tag(301) || ev.tag == tag(401));
/* The /alpha or /beta calls started above could be invoked (but NOT both);
* check this here */
/* We'll get tag 303 or 403, we want 300, 400 */
- live_call = ((int)(gpr_intptr)ev->tag) - 1;
+ live_call = ((int)(gpr_intptr)ev.tag) - 1;
got_client_start = 1;
}
- grpc_event_finish(ev);
}
+ GPR_ASSERT(live_call == 300 || live_call == 400);
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
@@ -333,18 +329,18 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK ==
grpc_call_start_batch(s1, ops, op - ops, tag(102)));
- cq_expect_completion(cqv, tag(102), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(live_call + 2), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(102), 1);
+ cq_expect_completion(cqv, tag(live_call + 2), 1);
/* first request is finished, we should be able to start the second */
live_call = (live_call == 300) ? 400 : 300;
- cq_expect_completion(cqv, tag(live_call + 1), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(live_call + 1), 1);
cq_verify(cqv);
GPR_ASSERT(GRPC_CALL_OK ==
grpc_server_request_call(f.server, &s2, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(201)));
- cq_expect_completion(cqv, tag(201), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(201), 1);
cq_verify(cqv);
op = ops;
@@ -362,8 +358,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK ==
grpc_call_start_batch(s2, ops, op - ops, tag(202)));
- cq_expect_completion(cqv, tag(live_call + 2), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(202), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(live_call + 2), 1);
+ cq_expect_completion(cqv, tag(202), 1);
cq_verify(cqv);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index d32930ca5a..364d59eea3 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -66,14 +66,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) {
@@ -162,7 +158,7 @@ static void test_max_message_length(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -171,8 +167,8 @@ 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(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_CANCELLED);
diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c
index b7cd2f1e86..979eb06d6c 100644
--- a/test/core/end2end/tests/no_op.c
+++ b/test/core/end2end/tests/no_op.c
@@ -64,14 +64,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) {
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index bc9a2547e7..c00beb7770 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -66,14 +66,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) {
@@ -152,7 +148,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(100)));
- cq_expect_completion(cqv, tag(100), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(100), 1);
cq_verify(cqv);
op = ops;
@@ -183,7 +179,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op++;
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(102), 1);
cq_verify(cqv);
op = ops;
@@ -192,8 +188,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op++;
GPR_ASSERT(GRPC_CALL_OK ==
grpc_call_start_batch(s, ops, op - ops, tag(103)));
- cq_expect_completion(cqv, tag(103), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(2), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(103), 1);
+ cq_expect_completion(cqv, tag(2), 1);
cq_verify(cqv);
grpc_byte_buffer_destroy(request_payload);
@@ -218,10 +214,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(104)));
- cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(3), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
- cq_expect_completion(cqv, tag(104), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(1), 1);
+ cq_expect_completion(cqv, tag(3), 1);
+ cq_expect_completion(cqv, tag(101), 1);
+ cq_expect_completion(cqv, tag(104), 1);
cq_verify(cqv);
grpc_call_destroy(c);
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index b2bae66f6e..80f7d20dce 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -68,14 +68,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) {
@@ -145,7 +141,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -162,8 +158,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
op++;
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);
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
index 58abf95592..ce872a4082 100644
--- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
@@ -66,14 +66,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) {
@@ -180,7 +176,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -204,8 +200,8 @@ static void test_request_response_with_metadata_and_payload(
op++;
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_OK);
diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
index d5e5cb95b5..b4edb7362d 100644
--- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
@@ -66,14 +66,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) {
@@ -166,7 +162,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -190,8 +186,8 @@ static void test_request_response_with_metadata_and_payload(
op++;
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_OK);
diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c
index 558b2dd049..cb50855561 100644
--- a/test/core/end2end/tests/request_response_with_payload.c
+++ b/test/core/end2end/tests/request_response_with_payload.c
@@ -66,14 +66,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) {
@@ -158,7 +154,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -181,8 +177,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
op++;
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_OK);
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
index 3759bd0824..ec3f310eae 100644
--- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
+++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
@@ -80,14 +80,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) {
@@ -214,11 +210,11 @@ static void request_response_with_payload_and_call_creds(
&request_metadata_recv,
f.cq, f.cq,
tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
/* Cannot set creds on the server call object. */
- GPR_ASSERT(grpc_call_set_credentials(s, NULL) != GRPC_CALL_OK);
+ GPR_ASSERT(!grpc_call_set_credentials(s, NULL));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
@@ -240,8 +236,8 @@ static void request_response_with_payload_and_call_creds(
op++;
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_OK);
diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
index 9c0e1d214b..1f1cb4cb42 100644
--- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
@@ -66,14 +66,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,9 +164,14 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(f.server, &s,
&call_details,
&request_metadata_recv,
+<<<<<<< HEAD
+ f.server_cq, tag(101)));
+ cq_expect_completion(v_server, tag(101), 1);
+=======
f.server_cq, f.server_cq,
tag(101)));
cq_expect_completion(v_server, tag(101), GRPC_OP_OK);
+>>>>>>> a468c36601dd5997580129bbd66b5ebed02521f8
cq_verify(v_server);
op = ops;
@@ -195,10 +196,10 @@ static void test_request_response_with_metadata_and_payload(
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_OK);
diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/request_with_large_metadata.c
index 33228e18a0..a137786d50 100644
--- a/test/core/end2end/tests/request_with_large_metadata.c
+++ b/test/core/end2end/tests/request_with_large_metadata.c
@@ -66,14 +66,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) {
@@ -162,7 +158,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -182,8 +178,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
op++;
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_OK);
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index 13e9d59203..86199c9f43 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -66,14 +66,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) {
@@ -153,7 +149,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -173,8 +169,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
op++;
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_OK);
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index 289acae9d6..c51019caff 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -54,14 +54,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) {
@@ -140,7 +136,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
grpc_server_request_call(f->server, &s, &call_details,
&request_metadata_recv, f->cq,
f->cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -157,8 +153,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
op++;
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);
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index 8dd5a2b266..be9e414b7c 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -68,14 +68,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) {
@@ -146,7 +142,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -163,8 +159,8 @@ 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(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);
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 241da3f103..566f971686 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
@@ -68,14 +68,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) {
@@ -146,7 +142,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq,
f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), GRPC_OP_OK);
+ cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -163,8 +159,8 @@ 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(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);