Use get_host_override_string function inline

pull/8241/head
Muxi Yan 8 years ago
parent df1da9ffc0
commit 56456c38e0
  1. 5
      test/core/end2end/tests/binary_metadata.c
  2. 7
      test/core/end2end/tests/call_creds.c
  3. 5
      test/core/end2end/tests/cancel_after_accept.c
  4. 5
      test/core/end2end/tests/cancel_after_client_done.c
  5. 5
      test/core/end2end/tests/cancel_after_invoke.c
  6. 5
      test/core/end2end/tests/cancel_before_invoke.c
  7. 5
      test/core/end2end/tests/cancel_in_a_vacuum.c
  8. 9
      test/core/end2end/tests/cancel_with_status.c
  9. 7
      test/core/end2end/tests/compressed_payload.c
  10. 12
      test/core/end2end/tests/disappearing_server.c
  11. 10
      test/core/end2end/tests/empty_batch.c
  12. 5
      test/core/end2end/tests/filter_call_init_fails.c
  13. 5
      test/core/end2end/tests/filter_causes_close.c
  14. 5
      test/core/end2end/tests/graceful_server_shutdown.c
  15. 10
      test/core/end2end/tests/high_initial_seqno.c
  16. 9
      test/core/end2end/tests/hpack_size.c
  17. 11
      test/core/end2end/tests/idempotent_request.c
  18. 5
      test/core/end2end/tests/invoke_large_request.c
  19. 5
      test/core/end2end/tests/large_metadata.c
  20. 11
      test/core/end2end/tests/load_reporting_hook.c
  21. 16
      test/core/end2end/tests/max_concurrent_streams.c
  22. 5
      test/core/end2end/tests/max_message_length.c
  23. 9
      test/core/end2end/tests/negative_deadline.c
  24. 5
      test/core/end2end/tests/network_status_change.c
  25. 17
      test/core/end2end/tests/no_logging.c
  26. 11
      test/core/end2end/tests/payload.c
  27. 5
      test/core/end2end/tests/ping_pong_streaming.c
  28. 7
      test/core/end2end/tests/registered_call.c
  29. 5
      test/core/end2end/tests/request_with_flags.c
  30. 5
      test/core/end2end/tests/request_with_payload.c
  31. 9
      test/core/end2end/tests/server_finishes_request.c
  32. 5
      test/core/end2end/tests/shutdown_finishes_calls.c
  33. 5
      test/core/end2end/tests/simple_cacheable_request.c
  34. 5
      test/core/end2end/tests/simple_delayed_request.c
  35. 5
      test/core/end2end/tests/simple_metadata.c
  36. 11
      test/core/end2end/tests/simple_request.c
  37. 5
      test/core/end2end/tests/streaming_error_response.c
  38. 5
      test/core/end2end/tests/trailing_metadata.c

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -149,7 +147,7 @@ static void test_request_response_with_metadata_and_payload(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -290,7 +288,6 @@ static void test_request_response_with_metadata_and_payload(
}
void binary_metadata(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_request_response_with_metadata_and_payload(config);
}

@ -51,8 +51,6 @@ static const char iam_selector[] = "selector";
static const char overridden_iam_token[] = "overridden_token";
static const char overridden_iam_selector[] = "overridden_selector";
static const char *authority;
typedef enum { NONE, OVERRIDE, DESTROY } override_mode;
static void *tag(intptr_t t) { return (void *)t; }
@ -167,7 +165,7 @@ static void request_response_with_payload_and_call_creds(
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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);
@ -402,7 +400,7 @@ static void test_request_with_server_rejecting_client_creds(
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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);
@ -475,7 +473,6 @@ static void test_request_with_server_rejecting_client_creds(
void call_creds(grpc_end2end_test_config config) {
if (config.feature_mask & FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS) {
authority = get_host_override_string("foo.test.google.fr", config);
test_request_response_with_payload_and_call_creds(config);
test_request_response_with_payload_and_overridden_call_creds(config);
test_request_response_with_payload_and_deleted_call_creds(config);

@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -128,7 +126,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -231,7 +229,6 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
void cancel_after_accept(grpc_end2end_test_config config) {
unsigned i;
authority = get_host_override_string("foo.test.google.fr", config);
for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
test_cancel_after_accept(config, cancellation_modes[i]);
}

@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -128,7 +126,7 @@ static void test_cancel_after_accept_and_writes_closed(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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 +233,6 @@ static void test_cancel_after_accept_and_writes_closed(
void cancel_after_client_done(grpc_end2end_test_config config) {
unsigned i;
authority = get_host_override_string("foo.test.google.fr", config);
for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
test_cancel_after_accept_and_writes_closed(config, cancellation_modes[i]);
}

@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -123,7 +121,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -194,7 +192,6 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
void cancel_after_invoke(grpc_end2end_test_config config) {
unsigned i, j;
authority = get_host_override_string("foo.test.google.fr", config);
for (j = 2; j < 6; j++) {
for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
test_cancel_after_invoke(config, cancellation_modes[i], j);

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -121,7 +119,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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));
@ -191,7 +189,6 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
void cancel_before_invoke(grpc_end2end_test_config config) {
size_t i;
authority = get_host_override_string("foo.test.google.fr", config);
for (i = 1; i <= 6; i++) {
test_cancel_before_invoke(config, i);
}

@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -108,7 +106,7 @@ static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
cq_verifier *v_client = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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));
@ -123,7 +121,6 @@ static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
void cancel_in_a_vacuum(grpc_end2end_test_config config) {
unsigned i;
authority = get_host_override_string("foo.test.google.fr", config);
for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
test_cancel_in_a_vacuum(config, cancellation_modes[i]);
}

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,7 @@ 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);
@ -115,7 +113,7 @@ 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", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -171,14 +169,13 @@ 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);
}
void cancel_with_status(grpc_end2end_test_config config) {
size_t i;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 1; i <= 4; i++) {
test_invoke_simple_request(config, i);
}

@ -50,8 +50,6 @@
#include "src/core/lib/surface/call_test_only.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -149,7 +147,7 @@ static void request_for_disabled_algorithm(
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -323,7 +321,7 @@ static void request_with_payload_template(
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -600,7 +598,6 @@ static void test_invoke_request_with_disabled_algorithm(
}
void compressed_payload(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_request_with_exceptionally_uncompressed_payload(config);
test_invoke_request_with_uncompressed_payload(config);
test_invoke_request_with_compressed_payload(config);

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static gpr_timespec n_seconds_time(int n) {
@ -81,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;
@ -99,7 +98,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
int was_cancelled = 2;
c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -199,12 +198,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);
@ -213,7 +212,6 @@ static void disappearing_server_test(grpc_end2end_test_config config) {
}
void disappearing_server(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION);
disappearing_server_test(config);
}

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,8 @@ 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);
@ -107,7 +106,7 @@ static void empty_batch_body(grpc_end2end_test_fixture f) {
grpc_op *op = NULL;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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);
@ -124,13 +123,12 @@ 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);
}
void empty_batch(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_empty_body(config);
}

@ -49,8 +49,6 @@
enum { TIMEOUT = 200000 };
static const char *authority;
static bool g_enable_filter = false;
static void *tag(intptr_t t) { return (void *)t; }
@ -130,7 +128,7 @@ static void test_request(grpc_end2end_test_config config) {
size_t details_capacity = 0;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -265,7 +263,6 @@ static void init_plugin(void) {
static void destroy_plugin(void) {}
void filter_call_init_fails(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
g_enable_filter = true;
test_request(config);
g_enable_filter = false;

@ -46,8 +46,6 @@
#include "src/core/lib/surface/channel_init.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static bool g_enable_filter = false;
static void *tag(intptr_t t) { return (void *)t; }
@ -126,7 +124,7 @@ static void test_request(grpc_end2end_test_config config) {
size_t details_capacity = 0;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -284,7 +282,6 @@ static void init_plugin(void) {
static void destroy_plugin(void) {}
void filter_causes_close(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
g_enable_filter = true;
test_request(config);
g_enable_filter = false;

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -114,7 +112,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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 +210,6 @@ static void test_early_server_shutdown_finishes_inflight_calls(
}
void graceful_server_shutdown(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_early_server_shutdown_finishes_inflight_calls(config);
}

@ -47,8 +47,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -101,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();
@ -119,7 +118,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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 +231,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);
@ -241,7 +240,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config,
}
void high_initial_seqno(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
test_invoke_10_simple_requests(config, 16777213);
if (config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION) {
test_invoke_10_simple_requests(config, 2147483645);

@ -47,8 +47,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
const char *hobbits[][2] = {
@ -241,7 +239,7 @@ 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();
@ -271,7 +269,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
extra_metadata[2].value_length = strlen(extra_metadata[2].value);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -386,7 +384,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);
@ -398,7 +396,6 @@ void hpack_size(grpc_end2end_test_config config) {
1000, 32768, 4 * 1024 * 1024};
size_t i, j;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 0; i < GPR_ARRAY_SIZE(interesting_sizes); i++) {
for (j = 0; j < GPR_ARRAY_SIZE(interesting_sizes); j++) {
test_size(config, interesting_sizes[i], interesting_sizes[j]);

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,7 @@ 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();
@ -118,7 +116,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -225,7 +223,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);
}
@ -235,7 +233,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);
@ -244,7 +242,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
void idempotent_request(grpc_end2end_test_config config) {
int i;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 0; i < 10; i++) {
test_invoke_simple_request(config);
}

@ -44,8 +44,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -147,7 +145,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -274,7 +272,6 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
}
void invoke_large_request(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_large_request(config, 16384, 65536);
test_invoke_large_request(config, 32768, 65536);

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -128,7 +126,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
meta.key = "key";
@ -257,7 +255,6 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
}
void large_metadata(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_request_with_large_metadata(config);
}

@ -48,8 +48,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/transport/static_metadata.h"
static const char *authority;
enum { TIMEOUT = 200000 };
static void *tag(intptr_t t) { return (void *)t; }
@ -123,7 +121,8 @@ 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,
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,
@ -154,7 +153,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
method_name, authority, deadline, NULL);
method_name, get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -308,15 +307,13 @@ 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);
}
void load_reporting_hook(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_load_reporting_hook(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -97,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();
@ -115,7 +114,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -253,18 +252,18 @@ 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", authority, deadline, NULL);
"/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", authority, deadline, NULL);
"/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(
@ -441,7 +440,6 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
}
void max_concurrent_streams(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
test_max_concurrent_streams(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -143,7 +141,7 @@ 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,
"/foo", authority,
"/foo", get_host_override_string("foo.test.google.fr:1234", config),
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(c);
@ -397,7 +395,6 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
}
void max_message_length(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
test_max_message_length_on_request(config, false /* send_limit */);
test_max_message_length_on_request(config, true /* send_limit */);
test_max_message_length_on_response(config, false /* send_limit */);

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,7 @@ 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);
@ -115,7 +113,7 @@ 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", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -168,14 +166,13 @@ 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);
}
void negative_deadline(grpc_end2end_test_config config) {
size_t i;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 1; i <= 4; i++) {
test_invoke_simple_request(config, i);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
/* this is a private API but exposed here for testing*/
extern void grpc_network_status_shutdown_all_endpoints();
@ -125,7 +123,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -238,7 +236,6 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
}
void network_status_change(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_network_status_change(config);
}

@ -47,8 +47,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
enum { TIMEOUT = 200000 };
static void *tag(intptr_t t) { return (void *)t; }
@ -127,7 +125,7 @@ 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();
@ -146,7 +144,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -251,7 +249,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);
}
@ -262,10 +260,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);
}
@ -286,17 +284,16 @@ 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);
}
void no_logging(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
gpr_set_log_function(log_dispatcher_func);
test_no_logging_in_one_request(config);
test_no_error_logging_in_entire_process(config);

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -97,7 +95,7 @@ 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) {
static void request_response_with_payload(grpc_end2end_test_config config, grpc_end2end_test_fixture f) {
gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you");
grpc_call *c;
@ -123,7 +121,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -252,7 +250,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);
}
@ -263,14 +261,13 @@ 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);
}
void payload(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_request_response_with_payload(config);
test_invoke_10_request_response_with_payload(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -126,7 +124,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
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", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -277,7 +275,6 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
void ping_pong_streaming(grpc_end2end_test_config config) {
int i;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 1; i < 10; i++) {
test_pingpong_streaming(config, i);
}

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -208,7 +206,7 @@ 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", authority, 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);
end_test(&f);
@ -219,7 +217,7 @@ 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", authority, 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);
@ -230,7 +228,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
}
void registered_call(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
test_invoke_simple_request(config);
test_invoke_10_simple_requests(config);
}

@ -44,8 +44,6 @@
#include "src/core/lib/transport/byte_stream.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -123,7 +121,7 @@ static void test_invoke_request_with_flags(
grpc_call_error expectation;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -188,7 +186,6 @@ static void test_invoke_request_with_flags(
void request_with_flags(grpc_end2end_test_config config) {
size_t i;
authority = get_host_override_string("foo.test.google.fr", config);
uint32_t flags_for_op[GRPC_OP_RECV_CLOSE_ON_SERVER + 1];
{

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -122,7 +120,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/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 +233,6 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
}
void request_with_payload(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_invoke_request_with_payload(config);
}

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,7 @@ 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();
@ -117,7 +115,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -205,13 +203,12 @@ 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);
}
void server_finishes_request(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr:1234", config);
test_invoke_simple_request(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -107,7 +105,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -194,7 +192,6 @@ static void test_early_server_shutdown_finishes_inflight_calls(
}
void shutdown_finishes_calls(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_early_server_shutdown_finishes_inflight_calls(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
enum { TIMEOUT = 200000 };
static void *tag(intptr_t t) { return (void *)t; }
@ -136,7 +134,7 @@ static void test_cacheable_request_response_with_metadata_and_payload(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -274,7 +272,6 @@ static void test_cacheable_request_response_with_metadata_and_payload(
}
void simple_cacheable_request(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_cacheable_request_response_with_metadata_and_payload(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static gpr_timespec n_seconds_time(int n) {
@ -109,7 +107,7 @@ 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", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -221,7 +219,6 @@ static void test_simple_delayed_request_long(grpc_end2end_test_config config) {
}
void simple_delayed_request(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION);
test_simple_delayed_request_short(config);
test_simple_delayed_request_long(config);

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -133,7 +131,7 @@ static void test_request_response_with_metadata_and_payload(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -266,7 +264,6 @@ static void test_request_response_with_metadata_and_payload(
}
void simple_metadata(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_request_response_with_metadata_and_payload(config);
}

@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -99,7 +97,7 @@ 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();
@ -118,7 +116,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
char *peer;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@ -225,7 +223,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);
}
@ -235,7 +233,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);
@ -244,7 +242,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
void simple_request(grpc_end2end_test_config config) {
int i;
authority = get_host_override_string("foo.test.google.fr:1234", config);
for (i = 0; i < 10; i++) {
test_invoke_simple_request(config);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -128,7 +126,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -273,7 +271,6 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
}
void streaming_error_response(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test(config, false);
test(config, true);
}

@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
static const char *authority;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@ -136,7 +134,7 @@ static void test_request_response_with_metadata_and_payload(
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", authority, deadline, NULL);
"/foo", get_host_override_string("foo.test.google.fr:1234", config), deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@ -271,7 +269,6 @@ static void test_request_response_with_metadata_and_payload(
}
void trailing_metadata(grpc_end2end_test_config config) {
authority = get_host_override_string("foo.test.google.fr", config);
test_request_response_with_metadata_and_payload(config);
}

Loading…
Cancel
Save