diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
commit | c586666cbdfc5b5f2a3306892f8b4491862c5aba (patch) | |
tree | 924f3f760a489ccf7c6c70307b72d1753aedbdf3 /test/core/channel | |
parent | 7cdad96fc49090eb5e3a12a7cca5a9f257d3f301 (diff) | |
parent | 1dc9ad33273e090a1c7ffa05991dc8ccc2badee6 (diff) |
Merge github.com:grpc/grpc into slice_with_exec_ctx
Diffstat (limited to 'test/core/channel')
-rw-r--r-- | test/core/channel/channel_args_test.c | 14 | ||||
-rw-r--r-- | test/core/channel/channel_stack_test.c | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index 261d0c5916..6a325bc12f 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -141,12 +141,26 @@ static void test_compression_algorithm_states(void) { grpc_exec_ctx_finish(&exec_ctx); } +static void test_set_socket_mutator(void) { + grpc_channel_args *ch_args; + grpc_socket_mutator mutator; + grpc_socket_mutator_init(&mutator, NULL); + + ch_args = grpc_channel_args_set_socket_mutator(NULL, &mutator); + GPR_ASSERT(ch_args->num_args == 1); + GPR_ASSERT(strcmp(ch_args->args[0].key, GRPC_ARG_SOCKET_MUTATOR) == 0); + GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_POINTER); + + grpc_channel_args_destroy(ch_args); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_create(); test_set_compression_algorithm(); test_compression_algorithm_states(); + test_set_socket_mutator(); grpc_shutdown(); return 0; } diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 3ecc8c0364..54575ae499 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -137,9 +137,10 @@ static void test_create_channel_stack(void) { GPR_ASSERT(*channel_data == 0); call_stack = gpr_malloc(channel_stack->call_stack_size); - grpc_error *error = grpc_call_stack_init( - &exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path, - gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); + grpc_error *error = + grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack, + NULL, NULL, path, gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); |