aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/http
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-04-18 16:25:17 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-04-18 17:39:48 -0700
commit4afce7e66ff9ea3d3118a386442cb9d2577e1926 (patch)
tree5d107befbf742dc5b477d3f870548b1a29ce2896 /test/core/http
parent279681311f61b079a720b7aef424cbe9000d08e8 (diff)
Changes across the board from pollset to pollset_set
Diffstat (limited to 'test/core/http')
-rw-r--r--test/core/http/httpcli_test.c9
-rw-r--r--test/core/http/httpscli_test.c10
2 files changed, 13 insertions, 6 deletions
diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c
index d3a68d0eb8..36e43b8de8 100644
--- a/test/core/http/httpcli_test.c
+++ b/test/core/http/httpcli_test.c
@@ -49,6 +49,7 @@ static int g_done = 0;
static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
+static grpc_pollset_set *g_pollset_set;
static gpr_timespec n_seconds_time(int seconds) {
return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds);
@@ -86,8 +87,8 @@ static void test_get(int port) {
req.http.path = "/get";
req.handshaker = &grpc_httpcli_plaintext;
- grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15),
- on_finish, (void *)42);
+ grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req,
+ n_seconds_time(15), on_finish, (void *)42);
gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
@@ -117,7 +118,7 @@ static void test_post(int port) {
req.http.path = "/post";
req.handshaker = &grpc_httpcli_plaintext;
- grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5,
+ grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
gpr_mu_lock(g_mu);
while (!g_done) {
@@ -182,6 +183,8 @@ int main(int argc, char **argv) {
grpc_httpcli_context_init(&g_context);
g_pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
+ g_pollset_set = grpc_pollset_set_create();
+ grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset);
test_get(port);
test_post(port);
diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c
index d807336904..1aeaf2cf10 100644
--- a/test/core/http/httpscli_test.c
+++ b/test/core/http/httpscli_test.c
@@ -49,6 +49,7 @@ static int g_done = 0;
static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
+static grpc_pollset_set *g_pollset_set;
static gpr_timespec n_seconds_time(int seconds) {
return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds);
@@ -87,8 +88,8 @@ static void test_get(int port) {
req.http.path = "/get";
req.handshaker = &grpc_httpcli_ssl;
- grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15),
- on_finish, (void *)42);
+ grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req,
+ n_seconds_time(15), on_finish, (void *)42);
gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
@@ -119,7 +120,7 @@ static void test_post(int port) {
req.http.path = "/post";
req.handshaker = &grpc_httpcli_ssl;
- grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5,
+ grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
gpr_mu_lock(g_mu);
while (!g_done) {
@@ -185,6 +186,8 @@ int main(int argc, char **argv) {
grpc_httpcli_context_init(&g_context);
g_pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
+ g_pollset_set = grpc_pollset_set_create();
+ grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset);
test_get(port);
test_post(port);
@@ -193,6 +196,7 @@ int main(int argc, char **argv) {
grpc_closure_init(&destroyed, destroy_pollset, g_pollset);
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
grpc_exec_ctx_finish(&exec_ctx);
+ grpc_pollset_set_destroy(g_pollset_set);
grpc_shutdown();
gpr_free(g_pollset);