stream_op cleanup: test fixes and updates
diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c
index 076a122..5e1ba11 100644
--- a/test/core/channel/channel_stack_test.c
+++ b/test/core/channel/channel_stack_test.c
@@ -42,22 +42,19 @@
#include "test/core/util/test_config.h"
static void channel_init_func(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem, grpc_channel *master,
- const grpc_channel_args *args,
- grpc_mdctx *metadata_context, int is_first,
- int is_last) {
- GPR_ASSERT(args->num_args == 1);
- GPR_ASSERT(args->args[0].type == GRPC_ARG_INTEGER);
- GPR_ASSERT(0 == strcmp(args->args[0].key, "test_key"));
- GPR_ASSERT(args->args[0].value.integer == 42);
- GPR_ASSERT(is_first);
- GPR_ASSERT(is_last);
+ grpc_channel_element *elem,
+ grpc_channel_element_args *args) {
+ GPR_ASSERT(args->channel_args->num_args == 1);
+ GPR_ASSERT(args->channel_args->args[0].type == GRPC_ARG_INTEGER);
+ GPR_ASSERT(0 == strcmp(args->channel_args->args[0].key, "test_key"));
+ GPR_ASSERT(args->channel_args->args[0].value.integer == 42);
+ GPR_ASSERT(args->is_first);
+ GPR_ASSERT(args->is_last);
*(int *)(elem->channel_data) = 0;
}
static void call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const void *server_transport_data,
- grpc_transport_stream_op *initial_op) {
+ grpc_call_element_args *args) {
++*(int *)(elem->channel_data);
*(int *)(elem->call_data) = 0;
}
@@ -86,9 +83,9 @@
static void test_create_channel_stack(void) {
const grpc_channel_filter filter = {
- call_func, channel_func, sizeof(int), call_init_func, call_destroy_func,
- sizeof(int), channel_init_func, channel_destroy_func, get_peer,
- "some_test_filter"};
+ call_func, channel_func, sizeof(int), call_init_func,
+ grpc_call_stack_ignore_set_pollset, call_destroy_func, sizeof(int),
+ channel_init_func, channel_destroy_func, get_peer, "some_test_filter"};
const grpc_channel_filter *filters = &filter;
grpc_channel_stack *channel_stack;
grpc_call_stack *call_stack;
@@ -119,7 +116,8 @@
GPR_ASSERT(*channel_data == 0);
call_stack = gpr_malloc(channel_stack->call_stack_size);
- grpc_call_stack_init(&exec_ctx, channel_stack, NULL, NULL, call_stack);
+ grpc_call_stack_init(&exec_ctx, channel_stack, 0, NULL, NULL, NULL, NULL,
+ call_stack);
GPR_ASSERT(call_stack->count == 1);
call_elem = grpc_call_stack_element(call_stack, 0);
GPR_ASSERT(call_elem->filter == channel_elem->filter);