grpc-java/okhttp
Eric Anderson 9de989bd64 okhttp: Avoid DNS lookup in test
Our tests assume localhost is in /etc/hosts or uses some other form of
local-only resolution. But that wouldn't apply to "host". What was
happening is this was causing a DNS resolution, which would fail, and
the InetSocketAddress would be "unresolved". Thus, the equivalent and
faster code would be `InetSocketAddress.createUnresolved("host", 1234)`.
But there doesn't seem to be any reason to avoid localhost in this test,
so swap to the more typical solution instead.

This should avoid flakes like:
```
io.grpc.okhttp.OkHttpClientTransportTest > invalidAuthorityPropagates FAILED
    org.junit.runners.model.TestTimedOutException: test timed out after 10 seconds
        at java.base@11.0.17/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.base@11.0.17/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
        at java.base@11.0.17/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1529)
        at java.base@11.0.17/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
        at java.base@11.0.17/java.net.InetAddress.getAllByName0(InetAddress.java:1519)
        at java.base@11.0.17/java.net.InetAddress.getAllByName(InetAddress.java:1378)
        at java.base@11.0.17/java.net.InetAddress.getAllByName(InetAddress.java:1306)
        at java.base@11.0.17/java.net.InetAddress.getByName(InetAddress.java:1256)
        at java.base@11.0.17/java.net.InetSocketAddress.<init>(InetSocketAddress.java:220)
        at app//io.grpc.okhttp.OkHttpClientTransportTest.invalidAuthorityPropagates(OkHttpClientTransportTest.java:1687)
```
2023-01-19 10:51:20 -08:00
..
src okhttp: Avoid DNS lookup in test 2023-01-19 10:51:20 -08:00
third_party/okhttp Avoid accidental locale-sensitive String.format() 2022-07-19 14:41:34 -07:00
BUILD.bazel okhttp: Add support for file-based private keys 2022-07-01 12:38:01 -07:00
build.gradle okhttp: Add missing server support for TLS ClientAuth (#9711) 2022-11-22 17:09:03 -08:00