Skip to content

Commit 0e72943

Browse files
committed
Add TestKit backend message TransactionClose
+ catch up with temp testkit feature flags + fixed alphabetical order in `testkitbackend/test_config.json` + implement fetchSize parameter in NewDriver
1 parent 4b9ad52 commit 0e72943

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

testkitbackend/requests.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def NewDriver(backend, data):
6868
data.mark_item_as_read("domainNameResolverRegistered")
6969
driver = neo4j.GraphDatabase.driver(
7070
data["uri"], auth=auth, user_agent=data["userAgent"],
71-
resolver=resolver, connection_timeout=connection_timeout
71+
resolver=resolver, connection_timeout=connection_timeout,
72+
fetch_size=data.get("fetchSize")
7273
)
7374
key = backend.next_key()
7475
backend.drivers[key] = driver
@@ -291,6 +292,13 @@ def TransactionRollback(backend, data):
291292
backend.send_response("Transaction", {"id": key})
292293

293294

295+
def TransactionClose(backend, data):
296+
key = data["txId"]
297+
tx = backend.transactions[key]
298+
tx.close()
299+
backend.send_response("Transaction", {"id": key})
300+
301+
294302
def ResultNext(backend, data):
295303
result = backend.results[data["resultId"]]
296304
try:

testkitbackend/test_config.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,18 @@
4141
"Feature:API:Result.Single": "Does not raise error when not exactly one record is available. To be fixed in 5.0",
4242
"Feature:API:Result.Peek": true,
4343
"AuthorizationExpiredTreatment": true,
44+
"Optimization:ConnectionReuse": true,
45+
"Optimization:EagerTransactionBegin": true,
4446
"Optimization:ImplicitDefaultArguments": true,
4547
"Optimization:MinimalResets": true,
46-
"Optimization:ConnectionReuse": true,
4748
"Optimization:PullPipelining": true,
4849
"ConfHint:connection.recv_timeout_seconds": true,
49-
"Temporary:ResultKeys": true,
50+
"Temporary:CypherPathAndRelationship": true,
51+
"Temporary:DriverFetchSize": true,
52+
"Temporary:DriverMaxTxRetryTime": true,
5053
"Temporary:FullSummary": true,
51-
"Temporary:CypherPathAndRelationship": true
54+
"Temporary:ResultKeys": true,
55+
"Temporary:ResultList": "requires further specification/discussion in the team",
56+
"Temporary:TransactionClose": true
5257
}
5358
}

0 commit comments

Comments
 (0)