Remove calls to grpc_call_accept from C core tests.

This call is deprecated.
pull/48/head
Craig Tiller 10 years ago
parent b876c68bcc
commit a2075b90d7
  1. 3
      test/core/echo/server.c
  2. 3
      test/core/end2end/dualstack_socket_test.c
  3. 3
      test/core/end2end/tests/cancel_after_accept.c
  4. 3
      test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
  5. 3
      test/core/end2end/tests/census_simple_request.c
  6. 3
      test/core/end2end/tests/disappearing_server.c
  7. 3
      test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
  8. 3
      test/core/end2end/tests/invoke_large_request.c
  9. 9
      test/core/end2end/tests/max_concurrent_streams.c
  10. 3
      test/core/end2end/tests/ping_pong_streaming.c
  11. 3
      test/core/end2end/tests/request_response_with_payload.c
  12. 3
      test/core/end2end/tests/simple_delayed_request.c
  13. 6
      test/core/end2end/tests/simple_request.c
  14. 5
      test/core/end2end/tests/thread_stress.c
  15. 3
      test/core/end2end/tests/writes_done_hangs_with_pending_read.c
  16. 3
      test/core/fling/server.c

@ -124,7 +124,8 @@ int main(int argc, char **argv) {
case GRPC_SERVER_RPC_NEW: case GRPC_SERVER_RPC_NEW:
if (ev->call != NULL) { if (ev->call != NULL) {
/* initial ops are already started in request_call */ /* 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); GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK);
request_call(); request_call();
} else { } else {

@ -131,7 +131,8 @@ void test_connect(const char *server_host, const char *client_host, int port,
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -133,7 +133,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -133,7 +133,8 @@ static void test_cancel_after_accept_and_writes_closed(
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -122,7 +122,8 @@ static void test_body(grpc_end2end_test_fixture f) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -115,7 +115,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -128,7 +128,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -143,7 +143,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -126,7 +126,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);
@ -216,7 +217,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
"test.google.com", deadline, NULL); "test.google.com", deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(live_call + 1), NULL);
cq_verify(v_client); cq_verify(v_client);
@ -246,7 +248,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
"test.google.com", deadline, NULL); "test.google.com", deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(live_call + 1), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -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", cq_expect_server_rpc_new(v_server, &s, tag(100), "/foo", "test.google.com",
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -141,7 +141,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -124,7 +124,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -126,7 +126,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);
@ -173,7 +174,8 @@ static void simple_request_body2(grpc_end2end_test_fixture f) {
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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( GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_write_status(
s, GRPC_STATUS_UNIMPLEMENTED, "xyz", tag(5))); s, GRPC_STATUS_UNIMPLEMENTED, "xyz", tag(5)));

@ -218,9 +218,10 @@ static void server_thread(void *p) {
break; break;
case GRPC_SERVER_RPC_NEW: case GRPC_SERVER_RPC_NEW:
if (ev->call) { 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, 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_read(ev->call, ev->tag));
GPR_ASSERT(GRPC_CALL_OK == GPR_ASSERT(GRPC_CALL_OK ==
grpc_call_start_write(ev->call, buf, ev->tag, 0)); grpc_call_start_write(ev->call, buf, ev->tag, 0));

@ -145,7 +145,8 @@ static void test_writes_done_hangs_with_pending_read(
deadline, NULL); deadline, NULL);
cq_verify(v_server); 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_expect_client_metadata_read(v_client, tag(2), NULL);
cq_verify(v_client); cq_verify(v_client);

@ -130,7 +130,8 @@ int main(int argc, char **argv) {
} else { } else {
s->flags = GRPC_WRITE_BUFFER_HINT; 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); GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK);
request_call(); request_call();
} else { } else {

Loading…
Cancel
Save