diff options
author | Craig Tiller <ctiller@google.com> | 2015-04-16 08:01:49 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-04-16 14:22:28 -0700 |
commit | 6902ad2e9c1e409b37b9b21a95e69a89b2be402f (patch) | |
tree | 29da7123f1db30b0b10cf4921a1e26be114f7c27 /test/core/end2end | |
parent | b12dc6b5bc448d58bc726c7f36ae9eecc8e4741b (diff) |
Switching to batch oriented metadata passing
Diffstat (limited to 'test/core/end2end')
5 files changed, 42 insertions, 23 deletions
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c index a120f27596..0169d52059 100644 --- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c @@ -115,14 +115,23 @@ static void test_request_response_with_metadata_and_payload( grpc_byte_buffer_create(&response_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); grpc_metadata meta_c[2] = { - {"key1-bin", "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13}, - {"key2-bin", "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", - 14}}; + {"key1-bin", + "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", + 13, + {{NULL, NULL, NULL}}}, + {"key2-bin", + "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", + 14, + {{NULL, NULL, NULL}}}}; grpc_metadata meta_s[2] = { {"key3-bin", - "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", 15}, + "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", + 15, + {{NULL, NULL, NULL}}}, {"key4-bin", - "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 16}}; + "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + 16, + {{NULL, NULL, NULL}}}}; grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL); cq_verifier *v_client = cq_verifier_create(f.client_cq); cq_verifier *v_server = cq_verifier_create(f.server_cq); diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload_legacy.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload_legacy.c index 75fddeacb1..f0cb14ae3c 100644 --- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload_legacy.c +++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload_legacy.c @@ -116,17 +116,25 @@ static void test_request_response_with_metadata_and_payload( gpr_timespec deadline = five_seconds_time(); /* staggered lengths to ensure we hit various branches in base64 encode/decode */ - grpc_metadata meta1 = { - "key1-bin", "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13}; + grpc_metadata meta1 = {"key1-bin", + "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", + 13, + {{NULL, NULL, NULL}}}; grpc_metadata meta2 = { - "key2-bin", "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", - 14}; + "key2-bin", + "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", + 14, + {{NULL, NULL, NULL}}}; grpc_metadata meta3 = { "key3-bin", - "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", 15}; + "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", + 15, + {{NULL, NULL, NULL}}}; grpc_metadata meta4 = { "key4-bin", - "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 16}; + "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + 16, + {{NULL, NULL, NULL}}}; grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL); cq_verifier *v_client = cq_verifier_create(f.client_cq); cq_verifier *v_server = cq_verifier_create(f.server_cq); diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c index d5f58d33b8..dc49242d39 100644 --- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c @@ -114,8 +114,10 @@ static void test_request_response_with_metadata_and_payload( grpc_byte_buffer *response_payload = grpc_byte_buffer_create(&response_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); - grpc_metadata meta_c[2] = {{"key1", "val1", 4}, {"key2", "val2", 4}}; - grpc_metadata meta_s[2] = {{"key3", "val3", 4}, {"key4", "val4", 4}}; + grpc_metadata meta_c[2] = {{"key1", "val1", 4, {{NULL, NULL, NULL}}}, + {"key2", "val2", 4, {{NULL, NULL, NULL}}}}; + grpc_metadata meta_s[2] = {{"key3", "val3", 4, {{NULL, NULL, NULL}}}, + {"key4", "val4", 4, {{NULL, NULL, NULL}}}}; grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL); cq_verifier *v_client = cq_verifier_create(f.client_cq); cq_verifier *v_server = cq_verifier_create(f.server_cq); diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload_legacy.c b/test/core/end2end/tests/request_response_with_metadata_and_payload_legacy.c index 91a0442d26..aaf8a53d52 100644 --- a/test/core/end2end/tests/request_response_with_metadata_and_payload_legacy.c +++ b/test/core/end2end/tests/request_response_with_metadata_and_payload_legacy.c @@ -114,10 +114,10 @@ static void test_request_response_with_metadata_and_payload( grpc_byte_buffer *response_payload = grpc_byte_buffer_create(&response_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); - grpc_metadata meta1 = {"key1", "val1", 4}; - grpc_metadata meta2 = {"key2", "val2", 4}; - grpc_metadata meta3 = {"key3", "val3", 4}; - grpc_metadata meta4 = {"key4", "val4", 4}; + grpc_metadata meta1 = {"key1", "val1", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta2 = {"key2", "val2", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta3 = {"key3", "val3", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta4 = {"key4", "val4", 4, {{NULL, NULL, NULL}}}; grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL); cq_verifier *v_client = cq_verifier_create(f.client_cq); cq_verifier *v_server = cq_verifier_create(f.server_cq); diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload_legacy.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload_legacy.c index 6431ec5ad5..aaa6078fa6 100644 --- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload_legacy.c +++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload_legacy.c @@ -114,12 +114,12 @@ static void test_request_response_with_metadata_and_payload( grpc_byte_buffer *response_payload = grpc_byte_buffer_create(&response_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); - grpc_metadata meta1 = {"key1", "val1", 4}; - grpc_metadata meta2 = {"key2", "val2", 4}; - grpc_metadata meta3 = {"key3", "val3", 4}; - grpc_metadata meta4 = {"key4", "val4", 4}; - grpc_metadata meta5 = {"key5", "val5", 4}; - grpc_metadata meta6 = {"key6", "val6", 4}; + grpc_metadata meta1 = {"key1", "val1", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta2 = {"key2", "val2", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta3 = {"key3", "val3", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta4 = {"key4", "val4", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta5 = {"key5", "val5", 4, {{NULL, NULL, NULL}}}; + grpc_metadata meta6 = {"key6", "val6", 4, {{NULL, NULL, NULL}}}; grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL); cq_verifier *v_client = cq_verifier_create(f.client_cq); cq_verifier *v_server = cq_verifier_create(f.server_cq); |