aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_config
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-05-06 16:59:03 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-05-09 14:30:41 -0700
commita301eaade83854cf172d39899232835f21e57690 (patch)
tree2915d1d66fd9b594e8a68963586dac8a5970b2d7 /test/core/client_config
parentc916c1ce17fe273dff881e1c87e17ad991c2078a (diff)
Allow servers to select compression level via initial MD.
Setting the newly added compression_level field of grpc_op::send_initial_metadata by a server now has the effect of applying that compression level for the subsequent call messages leaving the server. The ultimate meaning of the level depends on the client's supported compression algorithms.
Diffstat (limited to 'test/core/client_config')
-rw-r--r--test/core/client_config/lb_policies_test.c3
-rw-r--r--test/core/client_config/set_initial_connect_string_test.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c
index e766672cf5..be79c3c049 100644
--- a/test/core/client_config/lb_policies_test.c
+++ b/test/core/client_config/lb_policies_test.c
@@ -275,6 +275,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
GPR_ASSERT(c);
completed_client = 0;
+ memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
@@ -327,6 +328,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
}
if (s_idx >= 0) {
+ memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
@@ -415,6 +417,7 @@ static grpc_call **perform_multirequest(servers_fixture *f,
kill_server(f, i);
}
+ memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c
index 83058d9b2c..2555eb393f 100644
--- a/test/core/client_config/set_initial_connect_string_test.c
+++ b/test/core/client_config/set_initial_connect_string_test.c
@@ -133,6 +133,7 @@ static void start_rpc(int use_creds, int target_port) {
state.call = grpc_channel_create_call(
state.channel, NULL, GRPC_PROPAGATE_DEFAULTS, state.cq, "/Service/Method",
"localhost", gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
+ memset(&state.op, 0, sizeof(state.op));
state.op.op = GRPC_OP_SEND_INITIAL_METADATA;
state.op.data.send_initial_metadata.count = 0;
state.op.flags = 0;