Skip to content

Commit 26c002b

Browse files
authored
Add TestKit messages and features for list(result) (#621)
1 parent d12c875 commit 26c002b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

testkitbackend/requests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@ def ResultPeek(backend, data):
346346
backend.send_response("NullRecord", {})
347347

348348

349+
def ResultList(backend, data):
350+
result = backend.results[data["resultId"]]
351+
records = list(result)
352+
backend.send_response("RecordList", {
353+
"records": [totestkit.record(r) for r in records]
354+
})
355+
356+
349357
def ResultConsume(backend, data):
350358
result = backend.results[data["resultId"]]
351359
summary = result.consume()

testkitbackend/test_config.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
"Driver rejects empty queries before sending it to the server"
2727
},
2828
"features": {
29-
"Feature:API:Result.Single": "Does not raise error when not exactly one record is available. To be fixed in 5.0",
29+
"Feature:API:Result.List": true,
3030
"Feature:API:Result.Peek": true,
31+
"Feature:API:Result.Single": "Does not raise error when not exactly one record is available. To be fixed in 5.0.",
3132
"Feature:Auth:Bearer": true,
3233
"Feature:Auth:Custom": true,
3334
"Feature:Auth:Kerberos": true,
@@ -38,22 +39,22 @@
3839
"Feature:Bolt:4.3": true,
3940
"Feature:Bolt:4.4": true,
4041
"Feature:Impersonation": true,
41-
"Feature:TLS:1.1": "Driver blocks TLS 1.1 for security reasons",
42+
"Feature:TLS:1.1": "Driver blocks TLS 1.1 for security reasons.",
4243
"Feature:TLS:1.2": true,
43-
"Feature:TLS:1.3": "Depends on the machine (will be calculated dynamically)",
44+
"Feature:TLS:1.3": "Depends on the machine (will be calculated dynamically).",
4445
"AuthorizationExpiredTreatment": true,
4546
"Optimization:ConnectionReuse": true,
4647
"Optimization:EagerTransactionBegin": true,
4748
"Optimization:ImplicitDefaultArguments": true,
4849
"Optimization:MinimalResets": true,
4950
"Optimization:PullPipelining": true,
51+
"Optimization:ResultListFetchAll": "The idiomatic way to cast to list is indistinguishable from iterating over the result.",
5052
"ConfHint:connection.recv_timeout_seconds": true,
5153
"Temporary:CypherPathAndRelationship": true,
5254
"Temporary:DriverFetchSize": true,
5355
"Temporary:DriverMaxTxRetryTime": true,
5456
"Temporary:FullSummary": true,
5557
"Temporary:ResultKeys": true,
56-
"Temporary:ResultList": "requires further specification/discussion in the team",
5758
"Temporary:TransactionClose": true
5859
}
5960
}

0 commit comments

Comments
 (0)