Skip to content

Commit 2ac1923

Browse files
authored
Testkit compliance (#528)
* Add list of skipped testkit tests * Testkit backend: send traceback with BackendError
1 parent aeaf7a7 commit 2ac1923

File tree

5 files changed

+75
-7
lines changed

5 files changed

+75
-7
lines changed

neo4j/io/_bolt3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
SessionExpired,
4646
)
4747
from neo4j.io import (
48-
check_supported_server_product,
4948
Bolt,
5049
BoltPool,
50+
check_supported_server_product,
5151
)
5252
from neo4j.io._common import (
5353
CommitResponse,
@@ -62,6 +62,7 @@
6262
Unpacker,
6363
)
6464

65+
6566
log = getLogger("neo4j")
6667

6768

neo4j/io/_bolt4.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
Packer,
6363
)
6464

65+
6566
log = getLogger("neo4j")
6667

6768

neo4j/work/result.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def __init__(self, connection, on_network_error):
4747
connection raises of of the caught errors. The callback takes the
4848
error as argument.
4949
:type on_network_error callable
50-
5150
"""
5251
self._connection = connection
5352
self._on_network_error = on_network_error

testkitbackend/backend.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ def _process(self, request):
152152
if isinstance(e, Neo4jError):
153153
payload["code"] = e.code
154154
self.send_response("DriverError", payload)
155-
except Exception as e:
156-
traceback.print_exception(type(e), e, e.__traceback__)
157-
self.send_response("BackendError",
158-
{"msg": "%s: %s" % (type(e), e)})
155+
except Exception:
156+
tb = traceback.format_exc()
157+
log.error(tb)
158+
self.send_response("BackendError", {"msg": tb})
159159

160160
def send_response(self, name, data):
161161
""" Sends a response to backend.

testkitbackend/skipped_tests.json

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,68 @@
1-
{}
1+
{
2+
"stub.retry.TestRetryClustering.test_retry_ForbiddenOnReadOnlyDatabase_ChangingWriter":
3+
"Closes connection to router after ROUTE",
4+
"stub.routing.Routing.test_should_use_resolver_during_rediscovery_when_existing_routers_fail":
5+
"DNS resolver not implemented",
6+
"stub.routing.RoutingV3.test_should_use_resolver_during_rediscovery_when_existing_routers_fail":
7+
"DNS resolver not implemented",
8+
"stub.routing.RoutingV4.test_should_use_resolver_during_rediscovery_when_existing_routers_fail":
9+
"DNS resolver not implemented",
10+
"stub.routing.NoRouting.test_should_use_resolver_during_rediscovery_when_existing_routers_fail":
11+
"DNS resolver not implemented",
12+
"stub.routing.Routing.test_should_request_rt_from_all_initial_routers_until_successful":
13+
"DNS resolver not implemented",
14+
"stub.routing.RoutingV3.test_should_request_rt_from_all_initial_routers_until_successful":
15+
"DNS resolver not implemented",
16+
"stub.routing.RoutingV4.test_should_request_rt_from_all_initial_routers_until_successful":
17+
"DNS resolver not implemented",
18+
"stub.routing.NoRouting.test_should_request_rt_from_all_initial_routers_until_successful":
19+
"DNS resolver not implemented",
20+
"stub.routing.Routing.test_should_successfully_acquire_rt_when_router_ip_changes":
21+
"DNS resolver not implemented",
22+
"stub.routing.RoutingV3.test_should_successfully_acquire_rt_when_router_ip_changes":
23+
"DNS resolver not implemented",
24+
"stub.routing.RoutingV4.test_should_successfully_acquire_rt_when_router_ip_changes":
25+
"DNS resolver not implemented",
26+
"stub.routing.NoRouting.test_should_successfully_acquire_rt_when_router_ip_changes":
27+
"DNS resolver not implemented",
28+
"stub.routing.Routing.test_should_read_successfully_on_empty_discovery_result_using_session_run":
29+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
30+
"stub.routing.RoutingV3.test_should_read_successfully_on_empty_discovery_result_using_session_run":
31+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
32+
"stub.routing.RoutingV4.test_should_read_successfully_on_empty_discovery_result_using_session_run":
33+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
34+
"stub.routing.NoRouting.test_should_read_successfully_on_empty_discovery_result_using_session_run":
35+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
36+
"stub.routing.Routing.test_should_retry_read_tx_and_rediscovery_until_success":
37+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
38+
"stub.routing.RoutingV3.test_should_retry_read_tx_and_rediscovery_until_success":
39+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
40+
"stub.routing.RoutingV4.test_should_retry_read_tx_and_rediscovery_until_success":
41+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
42+
"stub.routing.NoRouting.test_should_retry_read_tx_and_rediscovery_until_success":
43+
"Driver iterates over results of custom resolver and settles on first connection yielding a successful handshake",
44+
"stub.routing.Routing.test_should_retry_write_until_success_with_leader_change_using_tx_function":
45+
"Driver opens a new connection each time to get a fresh routing table",
46+
"stub.routing.RoutingV3.test_should_retry_write_until_success_with_leader_change_using_tx_function":
47+
"Driver opens a new connection each time to get a fresh routing table",
48+
"stub.routing.RoutingV4.test_should_retry_write_until_success_with_leader_change_using_tx_function":
49+
"Driver opens a new connection each time to get a fresh routing table",
50+
"stub.routing.NoRouting.test_should_retry_write_until_success_with_leader_change_using_tx_function":
51+
"Driver opens a new connection each time to get a fresh routing table",
52+
"stub.routing.Routing.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function":
53+
"Driver opens a new connection each time to get a fresh routing table",
54+
"stub.routing.RoutingV3.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function":
55+
"Driver opens a new connection each time to get a fresh routing table",
56+
"stub.routing.RoutingV4.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function":
57+
"Driver opens a new connection each time to get a fresh routing table",
58+
"stub.routing.NoRouting.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function":
59+
"Driver opens a new connection each time to get a fresh routing table",
60+
"stub.routing.Routing.test_should_revert_to_initial_router_if_known_router_throws_protocol_errors":
61+
"Driver uses custom resolver for each connection, not only initial seeding",
62+
"stub.routing.RoutingV3.test_should_revert_to_initial_router_if_known_router_throws_protocol_errors":
63+
"Driver uses custom resolver for each connection, not only initial seeding",
64+
"stub.routing.RoutingV4.test_should_revert_to_initial_router_if_known_router_throws_protocol_errors":
65+
"Driver uses custom resolver for each connection, not only initial seeding",
66+
"stub.routing.NoRouting.test_should_revert_to_initial_router_if_known_router_throws_protocol_errors":
67+
"Driver uses custom resolver for each connection, not only initial seeding"
68+
}

0 commit comments

Comments
 (0)