Skip to content

Commit

Permalink
Wait for expectations to be fulfilled
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Jun 30, 2015
1 parent 47073d5 commit cf34343
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/core/end2end/tests/request_with_flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void test_invoke_request_with_flags(
gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
gpr_timespec deadline = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(100);
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_request_with_flags", NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
Expand Down Expand Up @@ -156,6 +156,11 @@ static void test_invoke_request_with_flags(
expectation = call_start_batch_expected_result;
GPR_ASSERT(expectation == grpc_call_start_batch(c, ops, op - ops, tag(1)));

if (expectation == GRPC_CALL_OK) {
cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
}

gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
Expand Down

0 comments on commit cf34343

Please sign in to comment.