|
34 | 34 | )
|
35 | 35 | from neo4j.exceptions import (
|
36 | 36 | ServiceUnavailable,
|
37 |
| - ClientError, |
38 | 37 | TransientError,
|
39 | 38 | SessionExpired,
|
40 | 39 | ConfigurationError,
|
41 | 40 | )
|
42 | 41 | from neo4j._exceptions import (
|
43 |
| - BoltRoutingError, |
44 | 42 | BoltSecurityError,
|
45 | 43 | )
|
46 | 44 | from tests.stub.conftest import StubCluster
|
@@ -214,7 +212,7 @@ def test_cannot_discover_servers_on_non_router(driver_info, test_script):
|
214 | 212 | def test_cannot_discover_servers_on_silent_router(driver_info, test_script):
|
215 | 213 | # python -m pytest tests/stub/test_routingdriver.py -s -v -k test_cannot_discover_servers_on_silent_router
|
216 | 214 | with StubCluster(test_script):
|
217 |
| - with pytest.raises(BoltRoutingError): |
| 215 | + with pytest.raises(ServiceUnavailable, match="routing"): |
218 | 216 | with GraphDatabase.driver(driver_info["uri_neo4j"], auth=driver_info["auth_token"]) as driver:
|
219 | 217 | assert isinstance(driver, Neo4jDriver)
|
220 | 218 | driver._pool.update_routing_table(database=None, bookmarks=None)
|
@@ -532,7 +530,7 @@ def test_should_serve_read_when_missing_writer(driver_info, test_scripts, test_r
|
532 | 530 | def test_should_error_when_missing_reader(driver_info, test_script):
|
533 | 531 | # python -m pytest tests/stub/test_routingdriver.py -s -v -k test_should_error_when_missing_reader
|
534 | 532 | with StubCluster(test_script):
|
535 |
| - with pytest.raises(BoltRoutingError): |
| 533 | + with pytest.raises(ServiceUnavailable, match="routing"): |
536 | 534 | with GraphDatabase.driver(driver_info["uri_neo4j"], auth=driver_info["auth_token"]) as driver:
|
537 | 535 | assert isinstance(driver, Neo4jDriver)
|
538 | 536 | driver._pool.update_routing_table(database=None, bookmarks=None)
|
|
0 commit comments