2727from gs_interactive .tests .conftest import call_procedure # noqa: E402
2828from gs_interactive .tests .conftest import create_procedure
2929from gs_interactive .tests .conftest import delete_procedure
30+ from gs_interactive .tests .conftest import ensure_compiler_schema_ready
3031from gs_interactive .tests .conftest import import_data_to_full_modern_graph
3132from gs_interactive .tests .conftest import import_data_to_partial_modern_graph
3233from gs_interactive .tests .conftest import import_data_to_vertex_only_modern_graph
@@ -61,6 +62,9 @@ def test_query_on_vertex_only_graph(
6162 """
6263 print ("[Query on vertex only graph]" )
6364 start_service_on_graph (interactive_session , create_vertex_only_modern_graph )
65+ ensure_compiler_schema_ready (
66+ interactive_session , neo4j_session , create_vertex_only_modern_graph
67+ )
6468 run_cypher_test_suite (
6569 neo4j_session , create_vertex_only_modern_graph , vertex_only_cypher_queries
6670 )
@@ -69,6 +73,10 @@ def test_query_on_vertex_only_graph(
6973 import_data_to_vertex_only_modern_graph (
7074 interactive_session , create_vertex_only_modern_graph
7175 )
76+ start_service_on_graph (interactive_session , create_vertex_only_modern_graph )
77+ ensure_compiler_schema_ready (
78+ interactive_session , neo4j_session , create_vertex_only_modern_graph
79+ )
7280 run_cypher_test_suite (
7381 neo4j_session , create_vertex_only_modern_graph , vertex_only_cypher_queries
7482 )
@@ -83,12 +91,19 @@ def test_query_on_partial_graph(
8391 print ("[Query on partial graph]" )
8492 # start service on new graph
8593 start_service_on_graph (interactive_session , create_partial_modern_graph )
94+ ensure_compiler_schema_ready (
95+ interactive_session , neo4j_session , create_partial_modern_graph
96+ )
8697 # try to query on the graph
8798 run_cypher_test_suite (neo4j_session , create_partial_modern_graph , cypher_queries )
8899 start_service_on_graph (interactive_session , "1" )
89100 import_data_to_partial_modern_graph (
90101 interactive_session , create_partial_modern_graph
91102 )
103+ start_service_on_graph (interactive_session , create_partial_modern_graph )
104+ ensure_compiler_schema_ready (
105+ interactive_session , neo4j_session , create_partial_modern_graph
106+ )
92107 run_cypher_test_suite (neo4j_session , create_partial_modern_graph , cypher_queries )
93108
94109
@@ -100,10 +115,17 @@ def test_query_on_full_modern_graph(
100115 """
101116 print ("[Query on full modern graph]" )
102117 start_service_on_graph (interactive_session , create_modern_graph )
118+ ensure_compiler_schema_ready (
119+ interactive_session , neo4j_session , create_modern_graph
120+ )
103121 # try to query on the graph
104122 run_cypher_test_suite (neo4j_session , create_modern_graph , cypher_queries )
105123 start_service_on_graph (interactive_session , "1" )
106124 import_data_to_full_modern_graph (interactive_session , create_modern_graph )
125+ start_service_on_graph (interactive_session , create_modern_graph )
126+ ensure_compiler_schema_ready (
127+ interactive_session , neo4j_session , create_modern_graph
128+ )
107129 run_cypher_test_suite (neo4j_session , create_modern_graph , cypher_queries )
108130
109131
@@ -129,6 +151,9 @@ def test_service_switching(
129151 )
130152 print ("Procedure id: " , a_proc_id )
131153 start_service_on_graph (interactive_session , create_modern_graph )
154+ ensure_compiler_schema_ready (
155+ interactive_session , neo4j_session , create_modern_graph
156+ )
132157 call_procedure (neo4j_session , create_modern_graph , a_proc_id )
133158
134159 # create procedure on graph_b_id
@@ -139,6 +164,9 @@ def test_service_switching(
139164 "MATCH(n: person) return count(n);" ,
140165 )
141166 start_service_on_graph (interactive_session , create_vertex_only_modern_graph )
167+ ensure_compiler_schema_ready (
168+ interactive_session , neo4j_session , create_vertex_only_modern_graph
169+ )
142170 call_procedure (neo4j_session , create_vertex_only_modern_graph , b_proc_id )
143171
144172
@@ -156,6 +184,9 @@ def test_procedure_creation(interactive_session, neo4j_session, create_modern_gr
156184 )
157185 print ("Procedure id: " , a_proc_id )
158186 start_service_on_graph (interactive_session , create_modern_graph )
187+ ensure_compiler_schema_ready (
188+ interactive_session , neo4j_session , create_modern_graph
189+ )
159190 call_procedure (neo4j_session , create_modern_graph , a_proc_id )
160191
161192 # create procedure with name containing space,
@@ -202,6 +233,9 @@ def test_builtin_procedure(interactive_session, neo4j_session, create_modern_gra
202233 )
203234 # Call the builtin procedure
204235 start_service_on_graph (interactive_session , create_modern_graph )
236+ ensure_compiler_schema_ready (
237+ interactive_session , neo4j_session , create_modern_graph
238+ )
205239 call_procedure (
206240 neo4j_session ,
207241 create_modern_graph ,
@@ -259,6 +293,10 @@ def test_list_jobs(interactive_session, create_vertex_only_modern_graph):
259293def test_call_proc_in_cypher (interactive_session , neo4j_session , create_modern_graph ):
260294 print ("[Test call procedure in cypher]" )
261295 import_data_to_full_modern_graph (interactive_session , create_modern_graph )
296+ start_service_on_graph (interactive_session , create_modern_graph )
297+ ensure_compiler_schema_ready (
298+ interactive_session , neo4j_session , create_modern_graph
299+ )
262300 result = neo4j_session .run (
263301 'MATCH(p: person) with p.id as oid CALL k_neighbors("person", oid, 1) return label_name, vertex_oid;'
264302 )
@@ -276,6 +314,9 @@ def test_custom_pk_name(
276314 interactive_session , create_graph_with_custom_pk_name
277315 )
278316 start_service_on_graph (interactive_session , create_graph_with_custom_pk_name )
317+ ensure_compiler_schema_ready (
318+ interactive_session , neo4j_session , create_graph_with_custom_pk_name
319+ )
279320 result = neo4j_session .run (
280321 "MATCH (n: person) where n.custom_id = 4 return n.custom_id;"
281322 )
@@ -289,4 +330,3 @@ def test_custom_pk_name(
289330 )
290331 records = result .fetch (1 )
291332 assert len (records ) == 1 and records [0 ]["$f0" ] == 2
292- start_service_on_graph (interactive_session , "1" )
0 commit comments