aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/naming
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <y-zeng@users.noreply.github.com>2017-09-22 14:16:44 -0700
committerGravatar GitHub <noreply@github.com>2017-09-22 14:16:44 -0700
commit806c9c8aba225bd83a85a419209e1cdfcf25c245 (patch)
tree5d2bc8cda9ea4ee41c6d22bdeed57148bd9ae0e4 /test/cpp/naming
parentfbddbd4545ebc4c96fc6c150945a8e83034e6f5d (diff)
parent3b6593679c28afd4455c7d38c417583ddc4341ef (diff)
Merge pull request #12631 from y-zeng/dns_fix
Drain readable fds in grpc_ares_ev_driver_posix
Diffstat (limited to 'test/cpp/naming')
-rw-r--r--test/cpp/naming/resolver_component_test.cc4
-rwxr-xr-xtest/cpp/naming/resolver_component_tests_runner.sh8
-rw-r--r--test/cpp/naming/resolver_test_record_groups.yaml6
3 files changed, 11 insertions, 7 deletions
diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc
index 396f4ceb9e..cc851ca9d5 100644
--- a/test/cpp/naming/resolver_component_test.cc
+++ b/test/cpp/naming/resolver_component_test.cc
@@ -267,7 +267,9 @@ void CheckResolverResultLocked(grpc_exec_ctx *exec_ctx, void *argsp,
}
EXPECT_THAT(args->expected_addrs, UnorderedElementsAreArray(found_lb_addrs));
CheckServiceConfigResultLocked(channel_args, args);
- CheckLBPolicyResultLocked(channel_args, args);
+ if (args->expected_service_config_string == "") {
+ CheckLBPolicyResultLocked(channel_args, args);
+ }
gpr_atm_rel_store(&args->done_atm, 1);
gpr_mu_lock(args->mu);
GRPC_LOG_IF_ERROR("pollset_kick",
diff --git a/test/cpp/naming/resolver_component_tests_runner.sh b/test/cpp/naming/resolver_component_tests_runner.sh
index 83b03b67a3..cf71c9dcf9 100755
--- a/test/cpp/naming/resolver_component_tests_runner.sh
+++ b/test/cpp/naming/resolver_component_tests_runner.sh
@@ -168,6 +168,14 @@ $FLAGS_test_bin_path \
--local_dns_server_address=127.0.0.1:$FLAGS_test_dns_server_port &
wait $! || EXIT_CODE=1
+$FLAGS_test_bin_path \
+ --target_name='ipv4-config-causing-fallback-to-tcp.resolver-tests.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooThree","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFour","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFive","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSix","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSeven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEight","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooNine","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTen","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEleven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]}]}' \
+ --expected_lb_policy='' \
+ --local_dns_server_address=127.0.0.1:$FLAGS_test_dns_server_port &
+wait $! || EXIT_CODE=1
+
kill -SIGTERM $DNS_SERVER_PID || true
wait
exit $EXIT_CODE
diff --git a/test/cpp/naming/resolver_test_record_groups.yaml b/test/cpp/naming/resolver_test_record_groups.yaml
index 67c611d831..33d774ca70 100644
--- a/test/cpp/naming/resolver_test_record_groups.yaml
+++ b/test/cpp/naming/resolver_test_record_groups.yaml
@@ -137,16 +137,10 @@ resolver_component_tests:
- {TTL: '2100', data: '2607:f8b0:400a:801::1002', type: AAAA}
srv-ipv6-target-has-backend-and-balancer:
- {TTL: '2100', data: '2607:f8b0:400a:801::1002', type: AAAA}
-
-resolver_component_tests_TODO:
-- 'TODO: enable this large-txt-record test once working. (it is much longer than 512
- bytes, likely to cause use of TCP even if max payload for UDP is changed somehow,
- e.g. via notes in RFC 2671)'
- expected_addrs:
- {address: '1.2.3.4:443', is_balancer: false}
expected_chosen_service_config: '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooThree","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFour","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFive","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSix","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSeven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEight","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooNine","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTen","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEleven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]}]}'
expected_lb_policy: null
- record_to_resolve: srv-ipv6-target-has-backend-and-balancer
record_to_resolve: ipv4-config-causing-fallback-to-tcp
records:
ipv4-config-causing-fallback-to-tcp: