diff options
author | Yijie Ma <yijiem@google.com> | 2023-12-14 13:01:03 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-14 13:03:55 -0800 |
commit | 90cdff5a3c7dddea2cce609b5bba5773896dfa2b (patch) | |
tree | 6acb5518eccd429e1aff3c493fcc70735f6ee7e2 /test | |
parent | b455726401587212a39bb43158e20f40aad3e540 (diff) | |
download | grpc-grpc-90cdff5a3c7dddea2cce609b5bba5773896dfa2b.tar.gz |
[EventEngine] Returns error instead of assertion when hostname is empty (#35306)
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes #35306
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35306 from yijiem:dns-empty-hostname 9c7f67c27ae2860569f95aa056f0dc0ff86f7bce
PiperOrigin-RevId: 591028370
Diffstat (limited to 'test')
-rw-r--r-- | test/core/event_engine/test_suite/tests/dns_test.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/event_engine/test_suite/tests/dns_test.cc b/test/core/event_engine/test_suite/tests/dns_test.cc index 587b7094f9..909fb34e03 100644 --- a/test/core/event_engine/test_suite/tests/dns_test.cc +++ b/test/core/event_engine/test_suite/tests/dns_test.cc @@ -591,4 +591,9 @@ TEST_F(EventEngineDNSTest, UnparseableHostPortsBadLocalhostWithPort) { TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), &dns_resolver_signal_, "[localhost]:1"); } + +TEST_F(EventEngineDNSTest, UnparseableHostPortsEmptyHostname) { + TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, ":443"); +} // END |