aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/end2end/connection_refused_test.c9
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c9
-rw-r--r--test/core/end2end/tests/max_message_length.c18
3 files changed, 20 insertions, 16 deletions
diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c
index 2814c94e2e..c14d72f49e 100644
--- a/test/core/end2end/connection_refused_test.c
+++ b/test/core/end2end/connection_refused_test.c
@@ -76,7 +76,10 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
grpc_channel_args *args = NULL;
if (use_service_config) {
GPR_ASSERT(wait_for_ready);
- grpc_json_tree *service_config_json = grpc_json_tree_create(
+ grpc_arg arg;
+ arg.type = GRPC_ARG_STRING;
+ arg.key = GRPC_ARG_SERVICE_CONFIG;
+ arg.value.string =
"{\n"
" \"method_config\": [ {\n"
" \"name\": [\n"
@@ -84,10 +87,8 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
" ],\n"
" \"wait_for_ready\": true\n"
" } ]\n"
- "}");
- grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json);
+ "}";
args = grpc_channel_args_copy_and_add(args, &arg, 1);
- grpc_json_tree_unref(service_config_json);
}
/* create a call, channel to a port which will refuse connection */
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index a187311b79..d3155f1902 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -132,7 +132,10 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_channel_args *args = NULL;
if (use_service_config) {
- grpc_json_tree *service_config_json = grpc_json_tree_create(
+ grpc_arg arg;
+ arg.type = GRPC_ARG_STRING;
+ arg.key = GRPC_ARG_SERVICE_CONFIG;
+ arg.value.string =
"{\n"
" \"method_config\": [ {\n"
" \"name\": [\n"
@@ -140,10 +143,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
" ],\n"
" \"timeout\": { \"seconds\": 5 }\n"
" } ]\n"
- "}");
- grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json);
+ "}";
args = grpc_channel_args_copy_and_add(args, &arg, 1);
- grpc_json_tree_unref(service_config_json);
}
grpc_end2end_test_fixture f =
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index 05ac087c13..f1dbc214dd 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -137,7 +137,10 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(send_limit);
- grpc_json_tree *service_config_json = grpc_json_tree_create(
+ grpc_arg arg;
+ arg.type = GRPC_ARG_STRING;
+ arg.key = GRPC_ARG_SERVICE_CONFIG;
+ arg.value.string =
"{\n"
" \"method_config\": [ {\n"
" \"name\": [\n"
@@ -145,10 +148,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
" ],\n"
" \"max_request_message_bytes\": 5\n"
" } ]\n"
- "}");
- grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json);
+ "}";
client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
- grpc_json_tree_unref(service_config_json);
} else {
// Set limit via channel args.
grpc_arg arg;
@@ -308,7 +309,10 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(!send_limit);
- grpc_json_tree *service_config_json = grpc_json_tree_create(
+ grpc_arg arg;
+ arg.type = GRPC_ARG_STRING;
+ arg.key = GRPC_ARG_SERVICE_CONFIG;
+ arg.value.string =
"{\n"
" \"method_config\": [ {\n"
" \"name\": [\n"
@@ -316,10 +320,8 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
" ],\n"
" \"max_response_message_bytes\": 5\n"
" } ]\n"
- "}");
- grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json);
+ "}";
client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
- grpc_json_tree_unref(service_config_json);
} else {
// Set limit via channel args.
grpc_arg arg;