diff options
author | Craig Tiller <ctiller@google.com> | 2015-12-08 22:03:36 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-12-08 22:03:36 -0800 |
commit | ed2164db57d471f34c31ed74fd0b179028c6182e (patch) | |
tree | 4bcdbae329597191d6b8a911074c9632995f1d91 /test/core | |
parent | 6d37d0bded605da74c17af087635970d1d8008fa (diff) |
Fixes, review feedback
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/httpcli/httpcli_test.c | 16 | ||||
-rw-r--r-- | test/core/httpcli/httpscli_test.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/test/core/httpcli/httpcli_test.c b/test/core/httpcli/httpcli_test.c index 4012f995c7..d47774251a 100644 --- a/test/core/httpcli/httpcli_test.c +++ b/test/core/httpcli/httpcli_test.c @@ -69,13 +69,13 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); } -static void test_get(int use_ssl, int port) { +static void test_get(int port) { grpc_httpcli_request req; char *host; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; g_done = 0; - gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_get", use_ssl); + gpr_log(GPR_INFO, "test_get"); gpr_asprintf(&host, "localhost:%d", port); gpr_log(GPR_INFO, "requesting from %s", host); @@ -83,7 +83,7 @@ static void test_get(int use_ssl, int port) { memset(&req, 0, sizeof(req)); req.host = host; req.path = "/get"; - req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext; + req.handshaker = &grpc_httpcli_plaintext; grpc_httpcli_get(&exec_ctx, &g_context, &g_pollset, &req, n_seconds_time(15), on_finish, (void *)42); @@ -100,13 +100,13 @@ static void test_get(int use_ssl, int port) { gpr_free(host); } -static void test_post(int use_ssl, int port) { +static void test_post(int port) { grpc_httpcli_request req; char *host; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; g_done = 0; - gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_post", (int)use_ssl); + gpr_log(GPR_INFO, "test_post"); gpr_asprintf(&host, "localhost:%d", port); gpr_log(GPR_INFO, "posting to %s", host); @@ -114,7 +114,7 @@ static void test_post(int use_ssl, int port) { memset(&req, 0, sizeof(req)); req.host = host; req.path = "/post"; - req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext; + req.handshaker = &grpc_httpcli_plaintext; grpc_httpcli_post(&exec_ctx, &g_context, &g_pollset, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); @@ -170,8 +170,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset_init(&g_pollset); - test_get(0, port); - test_post(0, port); + test_get(port); + test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pollset, &g_pollset); diff --git a/test/core/httpcli/httpscli_test.c b/test/core/httpcli/httpscli_test.c index 9b3c95e162..b1c1913cae 100644 --- a/test/core/httpcli/httpscli_test.c +++ b/test/core/httpcli/httpscli_test.c @@ -69,13 +69,13 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); } -static void test_get(int use_ssl, int port) { +static void test_get(int port) { grpc_httpcli_request req; char *host; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; g_done = 0; - gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_get", use_ssl); + gpr_log(GPR_INFO, "test_get"); gpr_asprintf(&host, "localhost:%d", port); gpr_log(GPR_INFO, "requesting from %s", host); @@ -84,7 +84,7 @@ static void test_get(int use_ssl, int port) { req.host = host; req.ssl_host_override = "foo.test.google.fr"; req.path = "/get"; - req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext; + req.handshaker = &grpc_httpcli_ssl; grpc_httpcli_get(&exec_ctx, &g_context, &g_pollset, &req, n_seconds_time(15), on_finish, (void *)42); @@ -101,13 +101,13 @@ static void test_get(int use_ssl, int port) { gpr_free(host); } -static void test_post(int use_ssl, int port) { +static void test_post(int port) { grpc_httpcli_request req; char *host; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; g_done = 0; - gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_post", (int)use_ssl); + gpr_log(GPR_INFO, "test_post"); gpr_asprintf(&host, "localhost:%d", port); gpr_log(GPR_INFO, "posting to %s", host); @@ -116,7 +116,7 @@ static void test_post(int use_ssl, int port) { req.host = host; req.ssl_host_override = "foo.test.google.fr"; req.path = "/post"; - req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext; + req.handshaker = &grpc_httpcli_ssl; grpc_httpcli_post(&exec_ctx, &g_context, &g_pollset, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); @@ -173,8 +173,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset_init(&g_pollset); - test_get(1, port); - test_post(1, port); + test_get(port); + test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pollset, &g_pollset); |