Skip to content

Commit d4513ef

Browse files
committed
Wait for other db to be available
not using WAIT in create database as in the near future we can run this against an AuraDB as well
1 parent 9d35f57 commit d4513ef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

graphdatascience/tests/integration/test_remote_graph_ops.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def test_remote_projection(gds_with_cloud_setup: AuraGraphDataScience) -> None:
4848
# @pytest.mark.cloud_architecture
4949
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
5050
def test_remote_projection_and_writeback_custom_database_name(gds_with_cloud_setup: AuraGraphDataScience) -> None:
51-
gds_with_cloud_setup.run_cypher("CREATE DATABASE test1234 IF NOT EXISTS")
52-
gds_with_cloud_setup.set_database("test1234")
51+
OTHER_DB = "test1234"
52+
gds_with_cloud_setup.run_cypher("CREATE DATABASE $dbName IF NOT EXISTS WAIT", {"dbName": OTHER_DB})
53+
gds_with_cloud_setup.set_database(OTHER_DB)
5354

5455
try:
5556
gds_with_cloud_setup.run_cypher("CREATE ()-[:T]->()")
@@ -82,7 +83,7 @@ def test_remote_projection_and_writeback_custom_database_name(gds_with_cloud_set
8283
nodes_with_wcc_default_db = gds_with_cloud_setup.run_cypher(count_wcc_nodes_query).squeeze()
8384
assert nodes_with_wcc_default_db == 0
8485
finally:
85-
gds_with_cloud_setup.run_cypher("DROP DATABASE test1234 IF EXISTS")
86+
gds_with_cloud_setup.run_cypher("DROP DATABASE $dbName IF EXISTS", {"dbName": OTHER_DB})
8687
gds_with_cloud_setup.set_database("neo4j")
8788

8889

0 commit comments

Comments
 (0)