aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/no_logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/tests/no_logging.c')
-rw-r--r--test/core/end2end/tests/no_logging.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c
index 8f9ef78ba2..54614cb029 100644
--- a/test/core/end2end/tests/no_logging.c
+++ b/test/core/end2end/tests/no_logging.c
@@ -83,7 +83,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -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);