Merge pull request #8241 from muxi/core-end2end-tests-cronet-update

Core end2end tests cronet update
pull/8664/merge
Muxi Yan 8 years ago committed by GitHub
commit 150fbe1e5f
  1. 13
      test/core/end2end/end2end_nosec_tests.c
  2. 13
      test/core/end2end/end2end_tests.c
  3. 7
      test/core/end2end/end2end_tests.h
  4. 3
      test/core/end2end/fixtures/h2_census.c
  5. 3
      test/core/end2end/fixtures/h2_compress.c
  6. 3
      test/core/end2end/fixtures/h2_fakesec.c
  7. 6
      test/core/end2end/fixtures/h2_fd.c
  8. 3
      test/core/end2end/fixtures/h2_full+pipe.c
  9. 3
      test/core/end2end/fixtures/h2_full+trace.c
  10. 3
      test/core/end2end/fixtures/h2_full.c
  11. 3
      test/core/end2end/fixtures/h2_http_proxy.c
  12. 3
      test/core/end2end/fixtures/h2_load_reporting.c
  13. 3
      test/core/end2end/fixtures/h2_oauth2.c
  14. 3
      test/core/end2end/fixtures/h2_proxy.c
  15. 6
      test/core/end2end/fixtures/h2_sockpair+trace.c
  16. 6
      test/core/end2end/fixtures/h2_sockpair.c
  17. 7
      test/core/end2end/fixtures/h2_sockpair_1byte.c
  18. 3
      test/core/end2end/fixtures/h2_ssl.c
  19. 3
      test/core/end2end/fixtures/h2_ssl_proxy.c
  20. 3
      test/core/end2end/fixtures/h2_uds.c
  21. 9
      test/core/end2end/tests/binary_metadata.c
  22. 15
      test/core/end2end/tests/call_creds.c
  23. 7
      test/core/end2end/tests/cancel_after_accept.c
  24. 6
      test/core/end2end/tests/cancel_after_client_done.c
  25. 6
      test/core/end2end/tests/cancel_after_invoke.c
  26. 6
      test/core/end2end/tests/cancel_before_invoke.c
  27. 6
      test/core/end2end/tests/cancel_in_a_vacuum.c
  28. 12
      test/core/end2end/tests/cancel_with_status.c
  29. 18
      test/core/end2end/tests/compressed_payload.c
  30. 17
      test/core/end2end/tests/disappearing_server.c
  31. 11
      test/core/end2end/tests/empty_batch.c
  32. 6
      test/core/end2end/tests/filter_call_init_fails.c
  33. 6
      test/core/end2end/tests/filter_causes_close.c
  34. 9
      test/core/end2end/tests/graceful_server_shutdown.c
  35. 15
      test/core/end2end/tests/high_initial_seqno.c
  36. 15
      test/core/end2end/tests/hpack_size.c
  37. 17
      test/core/end2end/tests/idempotent_request.c
  38. 9
      test/core/end2end/tests/invoke_large_request.c
  39. 9
      test/core/end2end/tests/large_metadata.c
  40. 22
      test/core/end2end/tests/load_reporting_hook.c
  41. 31
      test/core/end2end/tests/max_concurrent_streams.c
  42. 10
      test/core/end2end/tests/max_message_length.c
  43. 12
      test/core/end2end/tests/negative_deadline.c
  44. 9
      test/core/end2end/tests/network_status_change.c
  45. 23
      test/core/end2end/tests/no_logging.c
  46. 16
      test/core/end2end/tests/payload.c
  47. 7
      test/core/end2end/tests/ping_pong_streaming.c
  48. 20
      test/core/end2end/tests/registered_call.c
  49. 6
      test/core/end2end/tests/request_with_flags.c
  50. 9
      test/core/end2end/tests/request_with_payload.c
  51. 15
      test/core/end2end/tests/server_finishes_request.c
  52. 9
      test/core/end2end/tests/shutdown_finishes_calls.c
  53. 9
      test/core/end2end/tests/simple_cacheable_request.c
  54. 9
      test/core/end2end/tests/simple_delayed_request.c
  55. 9
      test/core/end2end/tests/simple_metadata.c
  56. 17
      test/core/end2end/tests/simple_request.c
  57. 9
      test/core/end2end/tests/streaming_error_response.c
  58. 9
      test/core/end2end/tests/trailing_metadata.c

@ -416,3 +416,16 @@ void grpc_end2end_tests(int argc, char **argv,
abort();
}
}
const char *get_host_override_string(const char *str,
grpc_end2end_test_config config) {
return (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER ? str
: NULL);
}
void validate_host_override_string(const char *pattern, const char *str,
grpc_end2end_test_config config) {
if (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER) {
GPR_ASSERT(0 == strcmp(str, pattern));
}
}

@ -424,3 +424,16 @@ void grpc_end2end_tests(int argc, char **argv,
abort();
}
}
const char *get_host_override_string(const char *str,
grpc_end2end_test_config config) {
return (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER ? str
: NULL);
}
void validate_host_override_string(const char *pattern, const char *str,
grpc_end2end_test_config config) {
if (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER) {
GPR_ASSERT(0 == strcmp(str, pattern));
}
}

@ -44,6 +44,7 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config;
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4
#define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 8
#define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL 16
#define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER 32
#define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
@ -69,4 +70,10 @@ struct grpc_end2end_test_config {
void grpc_end2end_tests_pre_init(void);
void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config);
const char *get_host_override_string(const char *str,
grpc_end2end_test_config config);
void validate_host_override_string(const char *pattern, const char *str,
grpc_end2end_test_config config);
#endif /* GRPC_TEST_CORE_END2END_END2END_TESTS_H */

@ -112,7 +112,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -114,7 +114,8 @@ void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack_compression,
chttp2_init_client_fullstack_compression,
chttp2_init_server_fullstack_compression,

@ -141,7 +141,8 @@ static grpc_end2end_test_config configs[] = {
{"chttp2/fake_secure_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_fake_secure_fullstack,
chttp2_init_server_fake_secure_fullstack,

@ -111,9 +111,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fd", 0, chttp2_create_fixture_socketpair,
chttp2_init_client_socketpair, chttp2_init_server_socketpair,
chttp2_tear_down_socketpair},
{"chttp2/fd", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {

@ -103,7 +103,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -103,7 +103,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -97,7 +97,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -108,7 +108,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -104,7 +104,8 @@ void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture *f) {
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack+load_reporting",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_load_reporting, chttp2_init_client_load_reporting,
chttp2_init_server_load_reporting, chttp2_tear_down_load_reporting},
};

@ -217,7 +217,8 @@ static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_with_oauth2_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,

@ -115,7 +115,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -141,9 +141,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/socketpair", 0, chttp2_create_fixture_socketpair,
chttp2_init_client_socketpair, chttp2_init_server_socketpair,
chttp2_tear_down_socketpair},
{"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {

@ -135,9 +135,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/socketpair", 0, chttp2_create_fixture_socketpair,
chttp2_init_client_socketpair, chttp2_init_server_socketpair,
chttp2_tear_down_socketpair},
{"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {

@ -135,9 +135,10 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/socketpair_one_byte_at_a_time", 0,
chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
{"chttp2/socketpair_one_byte_at_a_time",
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_socketpair,
chttp2_init_client_socketpair, chttp2_init_server_socketpair,
chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {

@ -152,7 +152,8 @@ static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,

@ -186,7 +186,8 @@ static grpc_end2end_test_config configs[] = {
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,

@ -102,7 +102,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};

@ -146,8 +146,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -248,7 +250,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));

@ -164,8 +164,10 @@ static void request_response_with_payload_and_call_creds(
f = begin_test(config, test_name, 0);
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
creds = grpc_google_iam_credentials_create(iam_token, iam_selector, NULL);
GPR_ASSERT(creds != NULL);
@ -294,7 +296,8 @@ static void request_response_with_payload_and_call_creds(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
@ -397,8 +400,10 @@ static void test_request_with_server_rejecting_client_creds(
f = begin_test(config, "test_request_with_server_rejecting_client_creds", 1);
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
creds = grpc_google_iam_credentials_create(iam_token, iam_selector, NULL);

@ -151,9 +151,10 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
begin_test(config, "cancel_after_accept", args, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/service/method", "foo.test.google.fr",
deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/service/method",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -125,8 +125,10 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -120,8 +120,10 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -118,8 +118,10 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK == grpc_call_cancel(c, NULL));

@ -105,8 +105,10 @@ static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
gpr_timespec deadline = five_seconds_time();
cq_verifier *v_client = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call *c;
gpr_timespec deadline = five_seconds_time();
cq_verifier *cqv = cq_verifier_create(f.cq);
@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -170,7 +172,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
simple_request_body(f, num_ops);
simple_request_body(config, f, num_ops);
end_test(&f);
config.tear_down_data(&f);
}

@ -146,8 +146,10 @@ static void request_for_disabled_algorithm(
f = begin_test(config, test_name, client_args, server_args);
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -242,7 +244,8 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(0 == strcmp(details, expected_details));
gpr_free(expected_details);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);
@ -318,8 +321,10 @@ static void request_with_payload_template(
f = begin_test(config, test_name, client_args, server_args);
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -491,7 +496,8 @@ static void request_with_payload_template(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
gpr_free(details);

@ -79,7 +79,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
static void do_request_and_shutdown_server(grpc_end2end_test_config config,
grpc_end2end_test_fixture *f,
cq_verifier *cqv) {
grpc_call *c;
grpc_call *s;
@ -96,9 +97,10 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -174,7 +176,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -196,12 +199,12 @@ static void disappearing_server_test(grpc_end2end_test_config config) {
config.init_client(&f, NULL);
config.init_server(&f, NULL);
do_request_and_shutdown_server(&f, cqv);
do_request_and_shutdown_server(config, &f, cqv);
/* now destroy and recreate the server */
config.init_server(&f, NULL);
do_request_and_shutdown_server(&f, cqv);
do_request_and_shutdown_server(config, &f, cqv);
cq_verifier_destroy(cqv);

@ -97,15 +97,18 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void empty_batch_body(grpc_end2end_test_fixture f) {
static void empty_batch_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
gpr_timespec deadline = five_seconds_time();
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_call_error error;
grpc_op *op = NULL;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
error = grpc_call_start_batch(c, op, 0, tag(1), NULL);
@ -122,7 +125,7 @@ static void test_invoke_empty_body(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_empty_body", NULL, NULL);
empty_batch_body(f);
empty_batch_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}

@ -127,8 +127,10 @@ static void test_request(grpc_end2end_test_config config) {
char *details = NULL;
size_t details_capacity = 0;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -123,8 +123,10 @@ static void test_request(grpc_end2end_test_config config) {
char *details = NULL;
size_t details_capacity = 0;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -111,8 +111,10 @@ static void test_early_server_shutdown_finishes_inflight_calls(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -190,7 +192,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);

@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -116,9 +117,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -189,7 +191,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -229,7 +232,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config,
initial_sequence_number);
f = begin_test(config, name, &client_args, NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f);
simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);

@ -239,7 +239,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t index) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -268,9 +269,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
extra_metadata[2].value = dragons[index % GPR_ARRAY_SIZE(dragons)];
extra_metadata[2].value_length = strlen(extra_metadata[2].value);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -342,7 +344,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -383,7 +386,7 @@ static void test_size(grpc_end2end_test_config config, int encode_size,
f = begin_test(config, name, encode_size != 4096 ? &client_args : NULL,
decode_size != 4096 ? &server_args : NULL);
for (i = 0; i < 4 * GPR_ARRAY_SIZE(hobbits); i++) {
simple_request_body(f, i);
simple_request_body(config, f, i);
}
end_test(&f);
config.tear_down_data(&f);

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -115,9 +116,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -202,7 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@ -222,7 +225,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
simple_request_body(f);
simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@ -232,7 +235,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f);
simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);

@ -144,8 +144,10 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -244,7 +246,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);

@ -125,8 +125,10 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
meta.key = "key";
@ -227,7 +229,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value));

@ -121,12 +121,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void request_response_with_payload(grpc_end2end_test_fixture f,
const char *method_name,
const char *request_msg,
const char *response_msg,
grpc_metadata *initial_lr_metadata,
grpc_metadata *trailing_lr_metadata) {
static void request_response_with_payload(
grpc_end2end_test_config config, grpc_end2end_test_fixture f,
const char *method_name, const char *request_msg, const char *response_msg,
grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) {
gpr_slice request_payload_slice = gpr_slice_from_static_string(request_msg);
gpr_slice response_payload_slice = gpr_slice_from_static_string(response_msg);
grpc_call *c;
@ -151,9 +149,10 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
method_name, "foo.test.google.fr", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, method_name,
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -307,8 +306,9 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) {
memset(&trailing_lr_metadata.internal_data, 0,
sizeof(trailing_lr_metadata.internal_data));
request_response_with_payload(f, method_name, request_msg, response_msg,
&initial_lr_metadata, &trailing_lr_metadata);
request_response_with_payload(config, f, method_name, request_msg,
response_msg, &initial_lr_metadata,
&trailing_lr_metadata);
end_test(&f);
grpc_channel_args_destroy(lr_server_args);
config.tear_down_data(&f);

@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -185,7 +187,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -250,20 +253,22 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
/* perform a ping-pong to ensure that settings have had a chance to round
trip */
simple_request_body(f);
simple_request_body(config, f);
/* perform another one to make sure that the one stream case still works */
simple_request_body(f);
simple_request_body(config, f);
/* start two requests - ensuring that the second is not accepted until
the first completes */
deadline = n_seconds_time(1000);
c1 = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/alpha", "foo.test.google.fr:1234", deadline,
NULL);
c1 = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/alpha",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c1);
c2 = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/beta", "foo.test.google.fr:1234", deadline,
NULL);
c2 = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/beta",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c2);
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(

@ -172,9 +172,10 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/service/method", "foo.test.google.fr:1234",
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/service/method",
get_host_override_string("foo.test.google.fr:1234", config),
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -247,7 +248,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.method, "/service/method"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
done:

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call *c;
gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_REALTIME);
cq_verifier *cqv = cq_verifier_create(f.cq);
@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -167,7 +169,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
simple_request_body(f, num_ops);
simple_request_body(config, f, num_ops);
end_test(&f);
config.tear_down_data(&f);
}

@ -122,8 +122,10 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -212,7 +214,8 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
// Expected behavior of a RPC when network is lost.
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);

@ -125,7 +125,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -143,9 +144,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -227,7 +229,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@ -248,7 +251,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
f = begin_test(config, "test_invoke_simple_request_with_no_error_logging",
NULL, NULL);
simple_request_body(f);
simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@ -259,10 +262,10 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
begin_test(config, "test_invoke_10_simple_requests_with_no_error_logging",
NULL, NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f);
simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
simple_request_body(f);
simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@ -283,10 +286,10 @@ static void test_no_logging_in_one_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_no_logging_in_last_request", NULL, NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f);
simple_request_body(config, f);
}
gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)test_no_log);
simple_request_body(f);
simple_request_body(config, f);
gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)gpr_default_log);
end_test(&f);
config.tear_down_data(&f);

@ -111,7 +111,8 @@ static gpr_slice generate_random_slice() {
return out;
}
static void request_response_with_payload(grpc_end2end_test_fixture f) {
static void request_response_with_payload(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
/* Create large request and response bodies. These are big enough to require
* multiple round trips to deliver to the peer, and their exact contents of
* will be verified on completion. */
@ -140,8 +141,10 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -240,7 +243,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice));
GPR_ASSERT(
@ -269,7 +273,7 @@ static void test_invoke_request_response_with_payload(
grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = begin_test(
config, "test_invoke_request_response_with_payload", NULL, NULL);
request_response_with_payload(f);
request_response_with_payload(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@ -280,7 +284,7 @@ static void test_invoke_10_request_response_with_payload(
grpc_end2end_test_fixture f = begin_test(
config, "test_invoke_10_request_response_with_payload", NULL, NULL);
for (i = 0; i < 10; i++) {
request_response_with_payload(f);
request_response_with_payload(config, f);
}
end_test(&f);
config.tear_down_data(&f);

@ -123,9 +123,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you");
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, void *rc) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -186,7 +187,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -204,10 +206,11 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_simple_request", NULL, NULL);
void *rc = grpc_channel_register_call(f.client, "/foo",
"foo.test.google.fr:1234", NULL);
void *rc = grpc_channel_register_call(
f.client, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), NULL);
simple_request_body(f, rc);
simple_request_body(config, f, rc);
end_test(&f);
config.tear_down_data(&f);
}
@ -216,11 +219,12 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
int i;
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
void *rc = grpc_channel_register_call(f.client, "/foo",
"foo.test.google.fr:1234", NULL);
void *rc = grpc_channel_register_call(
f.client, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f, rc);
simple_request_body(config, f, rc);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);

@ -120,8 +120,10 @@ static void test_invoke_request_with_flags(
size_t details_capacity = 0;
grpc_call_error expectation;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);

@ -119,8 +119,10 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -208,7 +210,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -114,9 +115,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -183,7 +185,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@ -202,7 +205,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
simple_request_body(f);
simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}

@ -104,8 +104,10 @@ static void test_early_server_shutdown_finishes_inflight_calls(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -171,7 +173,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);

@ -133,8 +133,10 @@ static void test_cacheable_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -235,7 +237,8 @@ static void test_cacheable_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) {
// Our simple proxy does not support cacheable requests
} else {

@ -106,8 +106,10 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
config.init_client(f, client_args);
c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -180,7 +182,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);

@ -130,8 +130,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -232,7 +234,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));

@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@ -115,9 +116,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr:1234", deadline,
NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -202,7 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@ -222,7 +225,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
simple_request_body(f);
simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@ -232,7 +235,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f);
simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);

@ -125,8 +125,10 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -245,7 +247,8 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
GPR_ASSERT(status == GRPC_STATUS_FAILED_PRECONDITION);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);

@ -133,8 +133,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
c = grpc_channel_create_call(
f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), deadline,
NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -236,7 +238,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
config);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
GPR_ASSERT(contains_metadata(&request_metadata_recv, "key1", "val1"));

Loading…
Cancel
Save