aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-06-08 09:26:42 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-06-08 09:26:42 -0700
commit0f016bdcf791685eb44cdc6e276b42618f5750f8 (patch)
treeda1767cff6ae4ff7d81956fb1b6691f73dd0a122
parentf21acddbb1ac4821af1641cf36d9e87404ec029d (diff)
Fix test verification
-rw-r--r--test/core/bad_client/tests/server_registered_method.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/test/core/bad_client/tests/server_registered_method.c b/test/core/bad_client/tests/server_registered_method.c
index 20cc714cc0..f52350302b 100644
--- a/test/core/bad_client/tests/server_registered_method.c
+++ b/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,
void *registered_method) {
- grpc_call_error error;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(cq);
- grpc_metadata_array request_metadata_recv;
- 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);
+ while (grpc_server_has_open_connections(server)) {
+ GPR_ASSERT(grpc_completion_queue_next(
+ cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
+ .type == GRPC_QUEUE_TIMEOUT);
+ }
}
int main(int argc, char **argv) {