aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-02-01 10:21:58 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-02-01 10:21:58 -0800
commiteeaeca8fae45275153fb552c2cb00be50535a824 (patch)
treee1ab1cf75edb4b18df0bc934d14374c7805ef918 /test/core/iomgr
parent4c2a9a2b69d1401d9c2495f584445d648973f7c3 (diff)
parenta3310f8e1dbbf98bbe91f8b334523496afc856a2 (diff)
Merge branch 'master' into pollset_set_test
Diffstat (limited to 'test/core/iomgr')
-rw-r--r--test/core/iomgr/combiner_test.c2
-rw-r--r--test/core/iomgr/endpoint_tests.c2
-rw-r--r--test/core/iomgr/resolve_address_posix_test.c2
-rw-r--r--test/core/iomgr/resolve_address_test.c2
-rw-r--r--test/core/iomgr/tcp_client_posix_test.c4
-rw-r--r--test/core/iomgr/tcp_posix_test.c10
-rw-r--r--test/core/iomgr/tcp_server_posix_test.c2
-rw-r--r--test/core/iomgr/udp_server_test.c2
8 files changed, 13 insertions, 13 deletions
diff --git a/test/core/iomgr/combiner_test.c b/test/core/iomgr/combiner_test.c
index 9b6d6ff9b4..4c9275a673 100644
--- a/test/core/iomgr/combiner_test.c
+++ b/test/core/iomgr/combiner_test.c
@@ -103,7 +103,7 @@ static void execute_many_loop(void *a) {
}
// sleep for a little bit, to test a combiner draining and another thread
// picking it up
- gpr_sleep_until(GRPC_TIMEOUT_MILLIS_TO_DEADLINE(100));
+ gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100));
}
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c
index bbc5f383f6..94067a8ca4 100644
--- a/test/core/iomgr/endpoint_tests.c
+++ b/test/core/iomgr/endpoint_tests.c
@@ -187,7 +187,7 @@ static void read_and_write_test(grpc_endpoint_test_config config,
size_t num_bytes, size_t write_size,
size_t slice_size, bool shutdown) {
struct read_and_write_test_state state;
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_endpoint_test_fixture f =
begin_test(config, "read_and_write_test", slice_size);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
diff --git a/test/core/iomgr/resolve_address_posix_test.c b/test/core/iomgr/resolve_address_posix_test.c
index e256609571..a4feff8b00 100644
--- a/test/core/iomgr/resolve_address_posix_test.c
+++ b/test/core/iomgr/resolve_address_posix_test.c
@@ -47,7 +47,7 @@
#include "test/core/util/test_config.h"
static gpr_timespec test_deadline(void) {
- return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(100);
+ return grpc_timeout_seconds_to_deadline(100);
}
typedef struct args_struct {
diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c
index 84f4ed4c90..54de9a20e1 100644
--- a/test/core/iomgr/resolve_address_test.c
+++ b/test/core/iomgr/resolve_address_test.c
@@ -42,7 +42,7 @@
#include "test/core/util/test_config.h"
static gpr_timespec test_deadline(void) {
- return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(100);
+ return grpc_timeout_seconds_to_deadline(100);
}
typedef struct args_struct {
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c
index 6bb00bc787..dcdff8efb1 100644
--- a/test/core/iomgr/tcp_client_posix_test.c
+++ b/test/core/iomgr/tcp_client_posix_test.c
@@ -57,7 +57,7 @@ static int g_connections_complete = 0;
static grpc_endpoint *g_connecting = NULL;
static gpr_timespec test_deadline(void) {
- return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
+ return grpc_timeout_seconds_to_deadline(10);
}
static void finish_connection() {
@@ -135,7 +135,7 @@ void test_succeeds(void) {
"pollset_work",
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))));
+ grpc_timeout_seconds_to_deadline(5))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c
index cabb64eb8f..99ecd581c6 100644
--- a/test/core/iomgr/tcp_posix_test.c
+++ b/test/core/iomgr/tcp_posix_test.c
@@ -175,7 +175,7 @@ static void read_test(size_t num_bytes, size_t slice_size) {
grpc_endpoint *ep;
struct read_socket_state state;
size_t written_bytes;
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO, "Read test of size %" PRIuPTR ", slice size %" PRIuPTR,
@@ -226,7 +226,7 @@ static void large_read_test(size_t slice_size) {
grpc_endpoint *ep;
struct read_socket_state state;
ssize_t written_bytes;
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO, "Start large read test, slice size %" PRIuPTR, slice_size);
@@ -330,7 +330,7 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) {
"pollset_work",
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
- GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10))));
+ grpc_timeout_milliseconds_to_deadline(10))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
do {
@@ -363,7 +363,7 @@ static void write_test(size_t num_bytes, size_t slice_size) {
uint8_t current_data = 0;
grpc_slice_buffer outgoing;
grpc_closure write_done_closure;
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO,
@@ -428,7 +428,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
struct read_socket_state state;
size_t written_bytes;
int fd;
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_closure fd_released_cb;
int fd_released_done = 0;
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c
index 417bc5111a..7122cd1e86 100644
--- a/test/core/iomgr/tcp_server_posix_test.c
+++ b/test/core/iomgr/tcp_server_posix_test.c
@@ -202,7 +202,7 @@ static void test_no_op_with_port_and_start(void) {
static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote,
socklen_t remote_len, on_connect_result *result) {
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
int clifd = socket(remote->sa_family, SOCK_STREAM, 0);
int nconnects_before;
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c
index e1210401c8..9ec6d7bf20 100644
--- a/test/core/iomgr/udp_server_test.c
+++ b/test/core/iomgr/udp_server_test.c
@@ -179,7 +179,7 @@ static void test_receive(int number_of_clients) {
gpr_mu_lock(g_mu);
for (i = 0; i < number_of_clients; i++) {
- deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
+ deadline = grpc_timeout_seconds_to_deadline(10);
number_of_reads_before = g_number_of_reads;
/* Create a socket, send a packet to the UDP server. */