aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-02-12 18:11:28 -0800
committerGravatar Vijay Pai <vpai@google.com>2016-02-12 18:11:28 -0800
commit8eef7e3b580bfe52f46844ea3a6f1c07485c7cbe (patch)
tree21ed491e058bbc537bc2c3995bf681eefe4b9681 /test
parent658317633726823d28ed4a240a0a001ff58ff1b5 (diff)
parent2d5e4dcaff6419f1e168738f46ffc15f165c2977 (diff)
Merge branch 'master' into alarm_openloop
Diffstat (limited to 'test')
-rw-r--r--test/core/fling/client.c12
-rw-r--r--test/cpp/end2end/async_end2end_test.cc4
-rw-r--r--test/distrib/python/distribtest.py2
3 files changed, 13 insertions, 5 deletions
diff --git a/test/core/fling/client.c b/test/core/fling/client.c
index 02db681cfd..b36aef3093 100644
--- a/test/core/fling/client.c
+++ b/test/core/fling/client.c
@@ -51,7 +51,7 @@ static grpc_channel *channel;
static grpc_completion_queue *cq;
static grpc_call *call;
static grpc_op ops[6];
-static grpc_op stream_init_op;
+static grpc_op stream_init_ops[2];
static grpc_op stream_step_ops[2];
static grpc_metadata_array initial_metadata_recv;
static grpc_metadata_array trailing_metadata_recv;
@@ -105,13 +105,17 @@ static void step_ping_pong_request(void) {
}
static void init_ping_pong_stream(void) {
+ grpc_metadata_array_init(&initial_metadata_recv);
+
grpc_call_error error;
call = grpc_channel_create_call(channel, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
"/Reflector/reflectStream", "localhost",
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
- stream_init_op.op = GRPC_OP_SEND_INITIAL_METADATA;
- stream_init_op.data.send_initial_metadata.count = 0;
- error = grpc_call_start_batch(call, &stream_init_op, 1, (void *)1, NULL);
+ stream_init_ops[0].op = GRPC_OP_SEND_INITIAL_METADATA;
+ stream_init_ops[0].data.send_initial_metadata.count = 0;
+ stream_init_ops[1].op = GRPC_OP_RECV_INITIAL_METADATA;
+ stream_init_ops[1].data.recv_initial_metadata = &initial_metadata_recv;
+ error = grpc_call_start_batch(call, stream_init_ops, 2, (void *)1, NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 252bda3798..a194c615cd 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -479,8 +479,10 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) {
send_request.set_message("Hello");
std::pair<grpc::string, grpc::string> meta1("key1", "val1");
std::pair<grpc::string, grpc::string> meta2("key2", "val2");
+ std::pair<grpc::string, grpc::string> meta3("g.r.d-bin", "xyz");
cli_ctx.AddMetadata(meta1.first, meta1.second);
cli_ctx.AddMetadata(meta2.first, meta2.second);
+ cli_ctx.AddMetadata(meta3.first, meta3.second);
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
@@ -494,6 +496,8 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) {
ToString(client_initial_metadata.find(meta1.first)->second));
EXPECT_EQ(meta2.second,
ToString(client_initial_metadata.find(meta2.first)->second));
+ EXPECT_EQ(meta3.second,
+ ToString(client_initial_metadata.find(meta3.first)->second));
EXPECT_GE(client_initial_metadata.size(), static_cast<size_t>(2));
send_response.set_message(recv_request.message());
diff --git a/test/distrib/python/distribtest.py b/test/distrib/python/distribtest.py
index 66c1f88796..dc20688140 100644
--- a/test/distrib/python/distribtest.py
+++ b/test/distrib/python/distribtest.py
@@ -1,4 +1,4 @@
-# Copyright 2015-2016, Google Inc.
+# Copyright 2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without