aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-17 14:31:44 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-17 14:31:44 -0700
commit654b242ce70afcf9fdab674cab9b71d8d3f02502 (patch)
treef463f15f28a23c0b94cd2c1e2a3250a416943ad1 /test/core/end2end
parenta628c84e86c0a545c7550e865a356ca4144047f8 (diff)
parent14c836fcd10e4f96ae1f4ac22fe43d42e2e293ba (diff)
Merge branch 'direct-calls' into buffer_pools_for_realsies
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/fuzzers/hpack.dictionary8
-rw-r--r--test/core/end2end/tests/load_reporting_hook.c4
-rw-r--r--test/core/end2end/tests/payload.c12
3 files changed, 14 insertions, 10 deletions
diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary
index a93bccfa0d..181bbe845e 100644
--- a/test/core/end2end/fuzzers/hpack.dictionary
+++ b/test/core/end2end/fuzzers/hpack.dictionary
@@ -63,9 +63,9 @@
"\x08if-range"
"\x13if-unmodified-since"
"\x0Dlast-modified"
+"\x07lb-cost"
+"\x08lb-token"
"\x04link"
-"\x16load-reporting-initial"
-"\x17load-reporting-trailing"
"\x08location"
"\x0Cmax-forwards"
"\x07:method"
@@ -138,9 +138,9 @@
"\x00\x08if-range\x00"
"\x00\x13if-unmodified-since\x00"
"\x00\x0Dlast-modified\x00"
+"\x00\x07lb-cost\x00"
+"\x00\x08lb-token\x00"
"\x00\x04link\x00"
-"\x00\x16load-reporting-initial\x00"
-"\x00\x17load-reporting-trailing\x00"
"\x00\x08location\x00"
"\x00\x0Cmax-forwards\x00"
"\x00\x07:method\x03GET"
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
index 59d054cf87..7f95dfd949 100644
--- a/test/core/end2end/tests/load_reporting_hook.c
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -295,13 +295,13 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) {
grpc_metadata initial_lr_metadata;
grpc_metadata trailing_lr_metadata;
- initial_lr_metadata.key = GRPC_LOAD_REPORTING_INITIAL_MD_KEY;
+ initial_lr_metadata.key = GRPC_LB_TOKEN_MD_KEY;
initial_lr_metadata.value = "client-token";
initial_lr_metadata.value_length = strlen(initial_lr_metadata.value);
memset(&initial_lr_metadata.internal_data, 0,
sizeof(initial_lr_metadata.internal_data));
- trailing_lr_metadata.key = GRPC_LOAD_REPORTING_TRAILING_MD_KEY;
+ trailing_lr_metadata.key = GRPC_LB_COST_MD_KEY;
trailing_lr_metadata.value = "server-token";
trailing_lr_metadata.value_length = strlen(trailing_lr_metadata.value);
memset(&trailing_lr_metadata.internal_data, 0,
diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c
index ed1c719ef8..40696d088f 100644
--- a/test/core/end2end/tests/payload.c
+++ b/test/core/end2end/tests/payload.c
@@ -99,12 +99,16 @@ static void end_test(grpc_end2end_test_fixture *f) {
static gpr_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
- char output[1024 * 1024];
- for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) {
+ char *output;
+ const size_t output_size = 1024 * 1024;
+ output = gpr_malloc(output_size);
+ for (i = 0; i < output_size - 1; ++i) {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
}
- output[GPR_ARRAY_SIZE(output) - 1] = '\0';
- return gpr_slice_from_copied_string(output);
+ output[output_size - 1] = '\0';
+ gpr_slice out = gpr_slice_from_copied_string(output);
+ gpr_free(output);
+ return out;
}
static void request_response_with_payload(grpc_end2end_test_fixture f) {