aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/surface
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/surface')
-rw-r--r--test/core/surface/alarm_test.c3
-rw-r--r--test/core/surface/completion_queue_test.c31
-rw-r--r--test/core/surface/completion_queue_threading_test.c5
-rw-r--r--test/core/surface/concurrent_connectivity_test.c7
-rw-r--r--test/core/surface/lame_client_test.c3
-rw-r--r--test/core/surface/sequential_connectivity_test.c4
-rw-r--r--test/core/surface/server_chttp2_test.c2
-rw-r--r--test/core/surface/server_test.c6
8 files changed, 33 insertions, 28 deletions
diff --git a/test/core/surface/alarm_test.c b/test/core/surface/alarm_test.c
index 7419d388a3..2c555db5dd 100644
--- a/test/core/surface/alarm_test.c
+++ b/test/core/surface/alarm_test.c
@@ -58,7 +58,8 @@ static void test_alarm(void) {
grpc_completion_queue *cc;
LOG_TEST("test_alarm");
- cc = grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ cc =
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
{
/* regular expiry */
grpc_event ev;
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index f76074f207..c90e72cde6 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -76,8 +76,8 @@ static void shutdown_and_destroy(grpc_completion_queue *cc) {
/* ensure we can create and destroy a completion channel */
static void test_no_op(void) {
grpc_cq_completion_type completion_types[] = {GRPC_CQ_NEXT, GRPC_CQ_PLUCK};
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
LOG_TEST("test_no_op");
for (size_t i = 0; i < GPR_ARRAY_SIZE(completion_types); i++) {
@@ -90,7 +90,8 @@ static void test_no_op(void) {
static void test_pollset_conversion(void) {
grpc_cq_completion_type completion_types[] = {GRPC_CQ_NEXT, GRPC_CQ_PLUCK};
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING};
+ grpc_cq_polling_type polling_types[] = {GRPC_CQ_DEFAULT_POLLING,
+ GRPC_CQ_NON_LISTENING};
grpc_completion_queue *cq;
LOG_TEST("test_pollset_conversion");
@@ -106,8 +107,8 @@ static void test_pollset_conversion(void) {
}
static void test_wait_empty(void) {
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_completion_queue *cc;
grpc_event event;
@@ -128,8 +129,8 @@ static void test_cq_end_op(void) {
grpc_event ev;
grpc_completion_queue *cc;
grpc_cq_completion completion;
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_exec_ctx init_exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_exec_ctx exec_ctx;
@@ -156,8 +157,8 @@ static void test_cq_end_op(void) {
}
static void test_shutdown_then_next_polling(void) {
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_completion_queue *cc;
grpc_event event;
LOG_TEST("test_shutdown_then_next_polling");
@@ -173,8 +174,8 @@ static void test_shutdown_then_next_polling(void) {
}
static void test_shutdown_then_next_with_timeout(void) {
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_completion_queue *cc;
grpc_event event;
LOG_TEST("test_shutdown_then_next_with_timeout");
@@ -195,8 +196,8 @@ static void test_pluck(void) {
grpc_completion_queue *cc;
void *tags[128];
grpc_cq_completion completions[GPR_ARRAY_SIZE(tags)];
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_exec_ctx init_exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_exec_ctx exec_ctx;
unsigned i, j;
@@ -244,8 +245,8 @@ static void test_pluck(void) {
}
static void test_pluck_after_shutdown(void) {
- grpc_cq_polling_type polling_types[] = {DEFAULT_POLLING, NON_LISTENING,
- NON_POLLING};
+ grpc_cq_polling_type polling_types[] = {
+ GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING};
grpc_event ev;
grpc_completion_queue *cc;
diff --git a/test/core/surface/completion_queue_threading_test.c b/test/core/surface/completion_queue_threading_test.c
index b101cd13f7..6a23aee537 100644
--- a/test/core/surface/completion_queue_threading_test.c
+++ b/test/core/surface/completion_queue_threading_test.c
@@ -101,7 +101,8 @@ static void test_too_many_plucks(void) {
LOG_TEST("test_too_many_plucks");
- cc = grpc_completion_queue_create(GRPC_CQ_PLUCK, DEFAULT_POLLING, NULL);
+ cc = grpc_completion_queue_create(GRPC_CQ_PLUCK, GRPC_CQ_DEFAULT_POLLING,
+ NULL);
gpr_thd_options_set_joinable(&thread_options);
for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) {
@@ -228,7 +229,7 @@ static void test_threading(size_t producers, size_t consumers) {
gpr_event phase1 = GPR_EVENT_INIT;
gpr_event phase2 = GPR_EVENT_INIT;
grpc_completion_queue *cc =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
size_t i;
size_t total_consumed = 0;
static int optid = 101;
diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c
index 3758b86fab..69f00f4d48 100644
--- a/test/core/surface/concurrent_connectivity_test.c
+++ b/test/core/surface/concurrent_connectivity_test.c
@@ -66,8 +66,8 @@ static int detag(void *p) { return (int)(uintptr_t)p; }
void create_loop_destroy(void *addr) {
for (int i = 0; i < NUM_OUTER_LOOPS; ++i) {
- grpc_completion_queue *cq =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue *cq = grpc_completion_queue_create(
+ GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_channel *chan = grpc_insecure_channel_create((char *)addr, NULL, NULL);
for (int j = 0; j < NUM_INNER_LOOPS; ++j) {
@@ -196,7 +196,8 @@ int main(int argc, char **argv) {
gpr_asprintf(&args.addr, "localhost:%d", port);
args.server = grpc_server_create(NULL, NULL);
grpc_server_add_insecure_http2_port(args.server, args.addr);
- args.cq = grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ args.cq =
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_server_register_completion_queue(args.server, args.cq, NULL);
grpc_server_start(args.server);
gpr_thd_new(&server, server_thread, &args, &options);
diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c
index 0cb183a4f0..6531e5eb18 100644
--- a/test/core/surface/lame_client_test.c
+++ b/test/core/surface/lame_client_test.c
@@ -108,7 +108,8 @@ int main(int argc, char **argv) {
GPR_ASSERT(GRPC_CHANNEL_SHUTDOWN ==
grpc_channel_check_connectivity_state(chan, 0));
- cq = grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ cq =
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_slice host = grpc_slice_from_static_string("anywhere");
call = grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
diff --git a/test/core/surface/sequential_connectivity_test.c b/test/core/surface/sequential_connectivity_test.c
index 37678a40d9..1880c0b859 100644
--- a/test/core/surface/sequential_connectivity_test.c
+++ b/test/core/surface/sequential_connectivity_test.c
@@ -77,7 +77,7 @@ static void run_test(const test_fixture *fixture) {
grpc_server *server = grpc_server_create(NULL, NULL);
fixture->add_server_port(server, addr);
grpc_completion_queue *server_cq =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_server_register_completion_queue(server, server_cq, NULL);
grpc_server_start(server);
@@ -88,7 +88,7 @@ static void run_test(const test_fixture *fixture) {
gpr_thd_new(&server_thread, server_thread_func, &sta, &thdopt);
grpc_completion_queue *cq =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_channel *channels[NUM_CONNECTIONS];
for (size_t i = 0; i < NUM_CONNECTIONS; i++) {
channels[i] = fixture->create_channel(addr);
diff --git a/test/core/surface/server_chttp2_test.c b/test/core/surface/server_chttp2_test.c
index 9fac63418f..47e8eeab1e 100644
--- a/test/core/surface/server_chttp2_test.c
+++ b/test/core/surface/server_chttp2_test.c
@@ -61,7 +61,7 @@ void test_add_same_port_twice() {
int port = grpc_pick_unused_port_or_die();
char *addr = NULL;
grpc_completion_queue *cq =
- grpc_completion_queue_create(GRPC_CQ_PLUCK, NON_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_PLUCK, GRPC_CQ_NON_POLLING, NULL);
grpc_server *server = grpc_server_create(&args, NULL);
grpc_server_credentials *fake_creds =
grpc_fake_transport_security_server_credentials_create();
diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c
index aa54794d14..e488966b93 100644
--- a/test/core/surface/server_test.c
+++ b/test/core/surface/server_test.c
@@ -71,7 +71,7 @@ void test_register_method_fail(void) {
void test_request_call_on_no_server_cq(void) {
grpc_completion_queue *cc =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_server *server = grpc_server_create(NULL, NULL);
GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE ==
grpc_server_request_call(server, NULL, NULL, NULL, cc, cc, NULL));
@@ -93,7 +93,7 @@ void test_bind_server_twice(void) {
grpc_server *server1 = grpc_server_create(&args, NULL);
grpc_server *server2 = grpc_server_create(&args, NULL);
grpc_completion_queue *cq =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
int port = grpc_pick_unused_port_or_die();
gpr_asprintf(&addr, "[::]:%d", port);
grpc_server_register_completion_queue(server1, cq, NULL);
@@ -131,7 +131,7 @@ void test_bind_server_to_addr(const char *host, bool secure) {
GPR_ASSERT(grpc_server_add_insecure_http2_port(server, addr));
}
grpc_completion_queue *cq =
- grpc_completion_queue_create(GRPC_CQ_NEXT, DEFAULT_POLLING, NULL);
+ grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL);
grpc_server_register_completion_queue(server, cq, NULL);
grpc_server_start(server);
grpc_server_shutdown_and_notify(server, cq, NULL);