aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-30 10:24:11 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-30 10:24:11 -0700
commitcf34343646c0d0864c89f356432a3cd1389c8f07 (patch)
tree259bb9b067a85e17778bdb2e5941e78f322fd490 /test
parent47073d59136fc560804c22130dca038032344d45 (diff)
Wait for expectations to be fulfilled
Diffstat (limited to 'test')
-rw-r--r--test/core/end2end/tests/request_with_flags.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index fac0602328..fb55a6512f 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -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);
@@ -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);