Merge branch 'fake_resolver' into service_config

pull/8303/head
Mark D. Roth 8 years ago
commit 49e405ac62
  1. 3
      src/core/ext/client_config/client_channel.c
  2. 12
      src/core/ext/resolver/sockaddr/sockaddr_resolver.c
  3. 6
      test/core/end2end/fake_resolver.c
  4. 1
      tools/run_tests/sources_and_headers.json
  5. 42
      tools/run_tests/tests.json

@ -209,7 +209,8 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg,
gpr_log(GPR_INFO,
"resolver requested LB policy %s but provided only balancer "
"addresses, no backend addresses -- forcing use of grpclb LB "
"policy", (lb_policy_name == NULL ? "(none)" : lb_policy_name));
"policy",
(lb_policy_name == NULL ? "(none)" : lb_policy_name));
}
lb_policy_name = "grpclb";
}

@ -160,9 +160,10 @@ char *unix_get_default_authority(grpc_resolver_factory *factory,
static void do_nothing(void *ignored) {}
static grpc_resolver *sockaddr_create(
grpc_resolver_args *args,
int parse(grpc_uri *uri, struct sockaddr_storage *dst, size_t *len)) {
static grpc_resolver *sockaddr_create(grpc_resolver_args *args,
int parse(grpc_uri *uri,
struct sockaddr_storage *dst,
size_t *len)) {
if (0 != strcmp(args->uri->authority, "")) {
gpr_log(GPR_ERROR, "authority based uri's not supported by the %s scheme",
args->uri->scheme);
@ -180,8 +181,9 @@ static grpc_resolver *sockaddr_create(
grpc_uri ith_uri = *args->uri;
char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
if (!parse(&ith_uri, (struct sockaddr_storage *)(&addresses->addresses[i]
.address.addr),
if (!parse(
&ith_uri,
(struct sockaddr_storage *)(&addresses->addresses[i].address.addr),
&addresses->addresses[i].address.len)) {
errors_found = true;
}

@ -174,9 +174,9 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory,
grpc_uri ith_uri = *args->uri;
char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
if (!parse_ipv4(&ith_uri,
(struct sockaddr_storage*)(&addresses->addresses[i]
.address.addr),
if (!parse_ipv4(
&ith_uri,
(struct sockaddr_storage*)(&addresses->addresses[i].address.addr),
&addresses->addresses[i].address.len)) {
errors_found = true;
}

@ -361,6 +361,7 @@
"grpc_test_util"
],
"headers": [],
"is_filegroup": false,
"language": "c",
"name": "dns_resolver_connectivity_test",
"src": [

@ -33393,6 +33393,27 @@
"posix"
]
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": 2,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_secure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
@ -33603,6 +33624,27 @@
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": 2,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_insecure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",

Loading…
Cancel
Save