diff --git a/test/core/echo/server.c b/test/core/echo/server.c index e70743af221..3cc5fd5909c 100644 --- a/test/core/echo/server.c +++ b/test/core/echo/server.c @@ -124,7 +124,8 @@ int main(int argc, char **argv) { case GRPC_SERVER_RPC_NEW: if (ev->call != NULL) { /* initial ops are already started in request_call */ - grpc_call_accept(ev->call, cq, s, GRPC_WRITE_BUFFER_HINT); + grpc_call_server_accept(ev->call, cq, s); + grpc_call_server_end_initial_metadata(ev->call, GRPC_WRITE_BUFFER_HINT); GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK); request_call(); } else { diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index d718a314d93..88a6acdd7d9 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -131,7 +131,8 @@ void test_connect(const char *server_host, const char *client_host, int port, deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 5339161f02c..467d360aaef 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -133,7 +133,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); 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 e20b0ec0b24..f75c629d2a3 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 @@ -133,7 +133,8 @@ static void test_cancel_after_accept_and_writes_closed( deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c index 64c0d12ca4a..baeed5cb46f 100644 --- a/test/core/end2end/tests/census_simple_request.c +++ b/test/core/end2end/tests/census_simple_request.c @@ -122,7 +122,8 @@ static void test_body(grpc_end2end_test_fixture f) { deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c index c421798fc76..d64dfe05c01 100644 --- a/test/core/end2end/tests/disappearing_server.c +++ b/test/core/end2end/tests/disappearing_server.c @@ -115,7 +115,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f, deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f->server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f->server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); 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 3855a7a3de4..77284b8cbb8 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 @@ -128,7 +128,8 @@ static void test_early_server_shutdown_finishes_inflight_calls( deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index bad86fb9dcd..cb2d81df2bb 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -143,7 +143,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config) { deadline, NULL); cq_verify(v_server); - grpc_call_accept(s, f.server_cq, tag(102), 0); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c index a418d1b15f3..e413b101492 100644 --- a/test/core/end2end/tests/max_concurrent_streams.c +++ b/test/core/end2end/tests/max_concurrent_streams.c @@ -126,7 +126,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) { deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); @@ -216,7 +217,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { "test.google.com", deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s1, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s1, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s1, 0)); cq_expect_client_metadata_read(v_client, tag(live_call + 1), NULL); cq_verify(v_client); @@ -246,7 +248,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { "test.google.com", deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s2, f.server_cq, tag(202), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s2, f.server_cq, tag(202))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s2, 0)); cq_expect_client_metadata_read(v_client, tag(live_call + 1), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 02a05e8e0c7..d9c5f480307 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -130,7 +130,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, cq_expect_server_rpc_new(v_server, &s, tag(100), "/foo", "test.google.com", deadline, NULL); cq_verify(v_server); - grpc_call_accept(s, f.server_cq, tag(102), 0); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c index deb61a7a8b9..2f5be04cf50 100644 --- a/test/core/end2end/tests/request_response_with_payload.c +++ b/test/core/end2end/tests/request_response_with_payload.c @@ -141,7 +141,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { deadline, NULL); cq_verify(v_server); - grpc_call_accept(s, f.server_cq, tag(102), 0); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index b90316c32eb..fb45b67ceb7 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -124,7 +124,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config, deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f->server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f->server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c index 3511f276e66..909d839e7a6 100644 --- a/test/core/end2end/tests/simple_request.c +++ b/test/core/end2end/tests/simple_request.c @@ -126,7 +126,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) { deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); @@ -173,7 +174,8 @@ static void simple_request_body2(grpc_end2end_test_fixture f) { deadline, NULL); cq_verify(v_server); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(s, f.server_cq, tag(102), 0)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_write_status( s, GRPC_STATUS_UNIMPLEMENTED, "xyz", tag(5))); diff --git a/test/core/end2end/tests/thread_stress.c b/test/core/end2end/tests/thread_stress.c index 4100b0e35d6..c68e8d34be2 100644 --- a/test/core/end2end/tests/thread_stress.c +++ b/test/core/end2end/tests/thread_stress.c @@ -218,9 +218,10 @@ static void server_thread(void *p) { break; case GRPC_SERVER_RPC_NEW: if (ev->call) { - GPR_ASSERT(GRPC_CALL_OK == grpc_call_accept(ev->call, + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(ev->call, g_fixture.server_cq, - ev->tag, 0)); + ev->tag)); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(ev->call,0)); GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_read(ev->call, ev->tag)); GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_write(ev->call, buf, ev->tag, 0)); diff --git a/test/core/end2end/tests/writes_done_hangs_with_pending_read.c b/test/core/end2end/tests/writes_done_hangs_with_pending_read.c index 2241519e894..5c5e264a21c 100644 --- a/test/core/end2end/tests/writes_done_hangs_with_pending_read.c +++ b/test/core/end2end/tests/writes_done_hangs_with_pending_read.c @@ -145,7 +145,8 @@ static void test_writes_done_hangs_with_pending_read( deadline, NULL); cq_verify(v_server); - grpc_call_accept(s, f.server_cq, tag(102), 0); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_accept(s, f.server_cq, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_server_end_initial_metadata(s, 0)); cq_expect_client_metadata_read(v_client, tag(2), NULL); cq_verify(v_client); diff --git a/test/core/fling/server.c b/test/core/fling/server.c index 44dc33a461f..1149d01ea17 100644 --- a/test/core/fling/server.c +++ b/test/core/fling/server.c @@ -130,7 +130,8 @@ int main(int argc, char **argv) { } else { s->flags = GRPC_WRITE_BUFFER_HINT; } - grpc_call_accept(ev->call, cq, s, s->flags); + grpc_call_server_accept(ev->call, cq, s); + grpc_call_server_end_initial_metadata(ev->call, s->flags); GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK); request_call(); } else {