Fix Build: IPv6: SocketAddressTest.SetFromStrings and AsyncSocketTest.ConnectTimeout failing
Summary: [Folly] Fix Build: IPv6: `SocketAddressTest.SetFromStrings` and `AsyncSocketTest.ConnectTimeout` failing On IPv6-only machines, the `SocketAddressTest.SetFromStrings` example in `folly/test/SocketAddressTest.cpp` was failing because it tries to resolve `127.0.0.1` with `AI_ADDRCONFIG` set. Fix it by detecting which of IPv6 and IPv4 are enabled, and picking an appropriate loopback address. On IPv6-only machines, the `AsyncSocketTest.ConnectTimeout` example in `folly/io/async/test/AsyncSocketTest2.cpp` was failing because it tries to connect `8.8.8.8`, which is IPv4. Fix it by detecting which of IPv6 and IPv4 are enabled, and picking an approprate remote address. Reviewed By: @chipturner Differential Revision: D2429109
Showing
Please register or sign in to comment