diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 14:45:10 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 14:45:10 -0800 |
commit | d57a1487b17a2fb7251cc575dd7161ae6c1bea13 (patch) | |
tree | 7635e13309c057d7449d3e1528429dca0070be69 /test/core/end2end/tests/no_logging.c | |
parent | 3e2048dd9cb2a5458105cbbbf4d4b4b67549bd5c (diff) | |
parent | 740665a6f65b3d827e0755de8bb1bcd57745b9f1 (diff) |
Merge github.com:grpc/grpc into newlines
Diffstat (limited to 'test/core/end2end/tests/no_logging.c')
-rw-r--r-- | test/core/end2end/tests/no_logging.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c index 1d3cfda6e5..54614cb029 100644 --- a/test/core/end2end/tests/no_logging.c +++ b/test/core/end2end/tests/no_logging.c @@ -125,7 +125,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -static void simple_request_body(grpc_end2end_test_fixture f) { +static void simple_request_body(grpc_end2end_test_config config, + grpc_end2end_test_fixture f) { grpc_call *c; grpc_call *s; gpr_timespec deadline = five_seconds_time(); @@ -143,9 +144,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) { int was_cancelled = 2; char *peer; - c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", "foo.test.google.fr:1234", deadline, - NULL); + c = grpc_channel_create_call( + f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", + get_host_override_string("foo.test.google.fr:1234", config), deadline, + NULL); GPR_ASSERT(c); peer = grpc_call_get_peer(c); @@ -227,7 +229,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) { GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); - GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); GPR_ASSERT(0 == call_details.flags); GPR_ASSERT(was_cancelled == 1); @@ -248,7 +251,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) { f = begin_test(config, "test_invoke_simple_request_with_no_error_logging", NULL, NULL); - simple_request_body(f); + simple_request_body(config, f); end_test(&f); config.tear_down_data(&f); } @@ -259,10 +262,10 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) { begin_test(config, "test_invoke_10_simple_requests_with_no_error_logging", NULL, NULL); for (i = 0; i < 10; i++) { - simple_request_body(f); + simple_request_body(config, f); gpr_log(GPR_INFO, "Passed simple request %d", i); } - simple_request_body(f); + simple_request_body(config, f); end_test(&f); config.tear_down_data(&f); } @@ -283,10 +286,10 @@ static void test_no_logging_in_one_request(grpc_end2end_test_config config) { grpc_end2end_test_fixture f = begin_test(config, "test_no_logging_in_last_request", NULL, NULL); for (i = 0; i < 10; i++) { - simple_request_body(f); + simple_request_body(config, f); } gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)test_no_log); - simple_request_body(f); + simple_request_body(config, f); gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)gpr_default_log); end_test(&f); config.tear_down_data(&f); |