Skip to content

Commit 07eeac8

Browse files
committed
Do not drop the database which is currently used
Instead, use `system` as the current db when dropping
1 parent c3bbaa4 commit 07eeac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphdatascience/tests/integration/test_database_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ def test_init_without_neo4j_db(runner: Neo4jQueryRunner) -> None:
2020
MY_DB_NAME = "bananas"
2121
runner.run_cypher("CREATE DATABASE $dbName WAIT", {"dbName": MY_DB_NAME})
2222

23-
runner.run_cypher("DROP DATABASE $dbName WAIT", {"dbName": default_database})
23+
runner.run_cypher("DROP DATABASE $dbName WAIT", {"dbName": default_database}, database="system")
2424

2525
try:
2626
gds = GraphDataScience(URI, AUTH, database=MY_DB_NAME)
2727
gds.close()
2828
finally:
29-
runner.run_cypher("CREATE DATABASE $dbName WAIT", {"dbName": default_database}, database=MY_DB_NAME)
29+
runner.run_cypher("CREATE DATABASE $dbName WAIT", {"dbName": default_database}, database="system")
3030
runner.run_cypher("DROP DATABASE $dbName WAIT", {"dbName": MY_DB_NAME})
3131

3232

0 commit comments

Comments
 (0)