aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/max_concurrent_streams.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-01-13 16:10:49 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-01-13 16:10:49 -0800
commit80fa15c15121a7d0ec020dec8bfa3697a96058b6 (patch)
tree7d7cc2a45d54dddae61d41108bea62eb63e5f4d6 /test/core/end2end/tests/max_concurrent_streams.c
parent94e5ddece6355939764bab6c2142d07b85f246ac (diff)
Moving prototype from Google to GitHub
I'd started some prototyping work on this change before the move to GitHub; this change restores things.
Diffstat (limited to 'test/core/end2end/tests/max_concurrent_streams.c')
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index a418d1b15f..e2f30d0778 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -113,9 +113,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK ==
- grpc_call_start_invoke(c, f.client_cq, tag(1), tag(2), tag(3), 0));
- cq_expect_invoke_accepted(v_client, tag(1), GRPC_OP_OK);
- cq_verify(v_client);
+ grpc_call_invoke(c, f.client_cq, tag(2), tag(3), 0));
GPR_ASSERT(GRPC_CALL_OK == grpc_call_writes_done(c, tag(4)));
cq_expect_finish_accepted(v_client, tag(4), GRPC_OP_OK);
@@ -191,14 +189,17 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(f.server, tag(100)));
- GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_invoke(c1, f.client_cq, tag(300),
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_invoke(c1, f.client_cq,
tag(301), tag(302), 0));
- GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_invoke(c2, f.client_cq, tag(400),
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_invoke(c2, f.client_cq,
tag(401), tag(402), 0));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_writes_done(c1, tag(303)));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_writes_done(c2, tag(303)));
+
ev = grpc_completion_queue_next(
f.client_cq, gpr_time_add(gpr_now(), gpr_time_from_seconds(10)));
GPR_ASSERT(ev);
- GPR_ASSERT(ev->type == GRPC_INVOKE_ACCEPTED);
+ GPR_ASSERT(ev->type == GRPC_FINISH_ACCEPTED);
GPR_ASSERT(ev->data.invoke_accepted == GRPC_OP_OK);
/* The /alpha or /beta calls started above could be invoked (but NOT both);
* check this here */
@@ -206,11 +207,6 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
live_call_obj = live_call == 300 ? c1 : c2;
grpc_event_finish(ev);
- GPR_ASSERT(GRPC_CALL_OK ==
- grpc_call_writes_done(live_call_obj, tag(live_call + 3)));
- cq_expect_finish_accepted(v_client, tag(live_call + 3), GRPC_OP_OK);
- cq_verify(v_client);
-
cq_expect_server_rpc_new(v_server, &s1, tag(100),
live_call == 300 ? "/alpha" : "/beta",
"test.google.com", deadline, NULL);
@@ -232,11 +228,6 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
GRPC_STATUS_UNIMPLEMENTED, "xyz", NULL);
live_call = (live_call == 300) ? 400 : 300;
live_call_obj = live_call == 300 ? c1 : c2;
- cq_expect_invoke_accepted(v_client, tag(live_call), GRPC_OP_OK);
- cq_verify(v_client);
-
- GPR_ASSERT(GRPC_CALL_OK ==
- grpc_call_writes_done(live_call_obj, tag(live_call + 3)));
cq_expect_finish_accepted(v_client, tag(live_call + 3), GRPC_OP_OK);
cq_verify(v_client);