Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions neo4j/addressing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion neo4j/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 0 additions & 18 deletions testkitbackend/test_config.json
Original file line number Diff line number Diff line change
@@ -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":
Expand Down