Fix test verification

pull/11336/head
Craig Tiller 8 years ago
parent f21acddbb1
commit 0f016bdcf7
  1. 26
      test/core/bad_client/tests/server_registered_method.c

@ -68,27 +68,11 @@ static void verifier_succeeds(grpc_server *server, grpc_completion_queue *cq,
static void verifier_fails(grpc_server *server, grpc_completion_queue *cq, static void verifier_fails(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
grpc_call_error error; while (grpc_server_has_open_connections(server)) {
grpc_call *s; GPR_ASSERT(grpc_completion_queue_next(
cq_verifier *cqv = cq_verifier_create(cq); cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
grpc_metadata_array request_metadata_recv; .type == GRPC_QUEUE_TIMEOUT);
gpr_timespec deadline; }
grpc_byte_buffer *payload = NULL;
grpc_metadata_array_init(&request_metadata_recv);
error = grpc_server_request_registered_call(server, registered_method, &s,
&deadline, &request_metadata_recv,
&payload, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(payload == NULL);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_unref(s);
cq_verifier_destroy(cqv);
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {

Loading…
Cancel
Save