diff --git a/neo4j/addressing.py b/neo4j/addressing.py index 908b84cb0..9e0d3c3ef 100644 --- a/neo4j/addressing.py +++ b/neo4j/addressing.py @@ -138,6 +138,10 @@ def host(self): def port(self): return self[1] + @property + def unresolved(self): + return self + @classmethod def _dns_resolve(cls, address, family=0): """ Regular DNS resolver. Takes an address object and optional @@ -226,6 +230,10 @@ class ResolvedAddress(Address): def host_name(self): return self._host_name + @property + def unresolved(self): + return (self._host_name, *self[1:]) + def resolve(self, family=0, resolver=None): return [self] diff --git a/neo4j/io/__init__.py b/neo4j/io/__init__.py index 38410dba6..20ac11229 100644 --- a/neo4j/io/__init__.py +++ b/neo4j/io/__init__.py @@ -1070,7 +1070,7 @@ def update_routing_table(self, *, database, bookmarks): def update_connection_pool(self, *, database): servers = self.routing_tables[database].servers() for address in list(self.connections): - if address not in servers: + if address.unresolved not in servers: super(Neo4jPool, self).deactivate(address) def ensure_routing_table_is_fresh(self, *, access_mode, database, diff --git a/testkitbackend/test_config.json b/testkitbackend/test_config.json index 47b97e7a4..49287b8a3 100644 --- a/testkitbackend/test_config.json +++ b/testkitbackend/test_config.json @@ -1,23 +1,5 @@ { "skips": { - "stub.routing.test_routing_v4x1.RoutingV4x1.test_should_retry_write_until_success_with_leader_change_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v3.RoutingV3.test_should_retry_write_until_success_with_leader_change_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v4x3.RoutingV4x3.test_should_retry_write_until_success_with_leader_change_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v4x1.RoutingV4x1.test_should_retry_write_until_success_with_leader_change_on_run_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v3.RoutingV3.test_should_retry_write_until_success_with_leader_change_on_run_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v4x3.RoutingV4x3.test_should_retry_write_until_success_with_leader_change_on_run_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v4x1.RoutingV4x1.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v3.RoutingV3.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", - "stub.routing.test_routing_v4x3.RoutingV4x3.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function": - "Driver closes connection to router if DNS resolved name not in routing table", "stub.routing.test_routing_v4x1.RoutingV4x1.test_should_successfully_acquire_rt_when_router_ip_changes": "Test makes assumptions about how verify_connectivity is implemented", "stub.routing.test_routing_v3.RoutingV3.test_should_successfully_acquire_rt_when_router_ip_changes":