Closed sylwiaszunejko closed 8 months ago
@sylwiaszunejko Could you add a unit test that verifies it works?
Does the distance
function continue to work properly?
host.address in self._allowed_hosts_resolved
(this part of that function)
@avelanarius I added unit test, is that enough or should I test something more?
Nice, thanks.
If the contact point is unix domain socket, there is no need to try to resolve it and use
socket.getaddrinfo
. In fact calling this function on unix domain socket makes it fail.This PR adds checking if host is
UnixSocketEndPoint
and adapts the behavior to the type of endpoint.I tested it manually by running this example:
Partially fixes: https://github.com/scylladb/python-driver/issues/280 (it adds support in
WhiteListRoundRobinPolicy
, but it is not enough for cqlsh to work)