diff options
author | Muxi Yan <mxyan@google.com> | 2016-10-30 23:11:11 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2016-10-30 23:42:38 -0700 |
commit | 56456c38e070aa07bbef7748b46cacfae5d3c671 (patch) | |
tree | aa8c03f1249b5ca2a87b49cbb9ea1f8581be48ba /test/core/end2end/tests/empty_batch.c | |
parent | df1da9ffc0be338742481b4e1a5e2a20c04e3d99 (diff) |
Use get_host_override_string function inline
Diffstat (limited to 'test/core/end2end/tests/empty_batch.c')
-rw-r--r-- | test/core/end2end/tests/empty_batch.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c index 146f83b080..580cbac67d 100644 --- a/test/core/end2end/tests/empty_batch.c +++ b/test/core/end2end/tests/empty_batch.c @@ -45,8 +45,6 @@ #include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" -static const char *authority; - static void *tag(intptr_t t) { return (void *)t; } static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, @@ -99,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -static void empty_batch_body(grpc_end2end_test_fixture f) { +static void empty_batch_body(grpc_end2end_test_config config, + grpc_end2end_test_fixture f) { grpc_call *c; gpr_timespec deadline = five_seconds_time(); cq_verifier *cqv = cq_verifier_create(f.cq); @@ -107,7 +106,7 @@ static void empty_batch_body(grpc_end2end_test_fixture f) { grpc_op *op = NULL; c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", authority, deadline, NULL); + "/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL); GPR_ASSERT(c); error = grpc_call_start_batch(c, op, 0, tag(1), NULL); @@ -124,13 +123,12 @@ static void test_invoke_empty_body(grpc_end2end_test_config config) { grpc_end2end_test_fixture f; f = begin_test(config, "test_invoke_empty_body", NULL, NULL); - empty_batch_body(f); + empty_batch_body(config, f); end_test(&f); config.tear_down_data(&f); } void empty_batch(grpc_end2end_test_config config) { - authority = get_host_override_string("foo.test.google.fr", config); test_invoke_empty_body(config); } |