pull/1888/head
Craig Tiller 10 years ago
parent 5532ae2c53
commit e6aabbb71b
  1. 5
      test/core/end2end/fixtures/chttp2_fake_security.c
  2. 6
      test/core/end2end/fixtures/chttp2_fullstack.c
  3. 2
      test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c
  4. 5
      test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c
  5. 16
      test/core/end2end/tests/cancel_after_accept_and_writes_closed.c

@ -60,8 +60,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
gpr_join_host_port(&ffd->localaddr, "localhost", port);
f.fixture_data = ffd;
f.client_cq = grpc_completion_queue_create();
f.server_cq = grpc_completion_queue_create();
f.cq = grpc_completion_queue_create();
return f;
}
@ -83,7 +82,7 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_destroy(f->server);
}
f->server = grpc_server_create(server_args);
grpc_server_register_completion_queue(f->server, f->server_cq);
grpc_server_register_completion_queue(f->server, f->cq);
GPR_ASSERT(grpc_server_add_secure_http2_port(f->server, ffd->localaddr, server_creds));
grpc_server_credentials_release(server_creds);
grpc_server_start(f->server);

@ -82,12 +82,8 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
if (f->server) {
grpc_server_destroy(f->server);
}
<<<<<<< HEAD
f->server = grpc_server_create(f->cq, server_args);
=======
f->server = grpc_server_create(server_args);
grpc_server_register_completion_queue(f->server, f->server_cq);
>>>>>>> b122e2ec9ff9c32b9ced1efbc02a06bc64178d9f
grpc_server_register_completion_queue(f->server, f->cq);
GPR_ASSERT(grpc_server_add_http2_port(f->server, ffd->localaddr));
grpc_server_start(f->server);
}

@ -83,7 +83,7 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_destroy(f->server);
}
f->server = grpc_server_create(server_args);
grpc_server_register_completion_queue(f->server, f->server_cq);
grpc_server_register_completion_queue(f->server, f->cq);
GPR_ASSERT(grpc_server_add_secure_http2_port(f->server, ffd->localaddr, server_creds));
grpc_server_credentials_release(server_creds);
grpc_server_start(f->server);

@ -94,8 +94,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
f.fixture_data = sfd;
f.client_cq = grpc_completion_queue_create();
f.server_cq = grpc_completion_queue_create();
f.cq = grpc_completion_queue_create();
*sfd = grpc_iomgr_create_endpoint_pair(1);
@ -118,7 +117,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_endpoint_pair *sfd = f->fixture_data;
GPR_ASSERT(!f->server);
f->server = grpc_server_create_from_filters(NULL, 0, server_args);
grpc_server_register_completion_queue(f->server, f->server_cq);
grpc_server_register_completion_queue(f->server, f->cq);
grpc_server_start(f->server);
grpc_create_chttp2_transport(server_setup_transport, f, server_args,
sfd->server, NULL, 0, grpc_mdctx_create(), 0);

@ -111,8 +111,7 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_call *s;
grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL);
gpr_timespec deadline = five_seconds_time();
cq_verifier *v_client = cq_verifier_create(f.client_cq);
cq_verifier *v_server = cq_verifier_create(f.server_cq);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@ -166,8 +165,8 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.server_cq,
f.server_cq, tag(2)));
cq_expect_completion(v_server, tag(2), GRPC_OP_OK);
cq_verify(v_server);
cq_expect_completion(cqv, tag(2), GRPC_OP_OK);
cq_verify(cqv);
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
@ -186,10 +185,8 @@ static void test_cancel_after_accept_and_writes_closed(
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c));
cq_expect_completion(v_server, tag(3), GRPC_OP_OK);
cq_verify(v_server);
cq_expect_completion(v_client, tag(1), GRPC_OP_OK);
cq_expect_completion(cqv, tag(3), GRPC_OP_OK);
cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
cq_verify(v_client);
GPR_ASSERT(status == mode.expect_status);
@ -210,8 +207,7 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_call_destroy(c);
grpc_call_destroy(s);
cq_verifier_destroy(v_client);
cq_verifier_destroy(v_server);
cq_verifier_destroy(cqv);
end_test(&f);
config.tear_down_data(&f);
}

Loading…
Cancel
Save