@@ -107,6 +107,8 @@ def test_build_single_node(self, gen_graph):
107107 cg = gen_graph (n_layers = 2 )
108108 # Add Chunk A
109109 create_chunk (cg , vertices = [to_label (cg , 1 , 0 , 0 , 0 , 0 )])
110+ chunk_id = to_label (cg , 1 , 0 , 0 , 0 , 0 )
111+ assert cg .id_client .get_max_node_id (chunk_id ) == chunk_id
110112
111113 res = cg .client ._table .read_rows ()
112114 res .consume_all ()
@@ -130,7 +132,7 @@ def test_build_single_node(self, gen_graph):
130132 assert len (children ) == 1 and children [0 ] == to_label (cg , 1 , 0 , 0 , 0 , 0 )
131133 # Make sure there are not any more entries in the table
132134 # include counters, meta and version rows
133- assert len (res .rows ) == 1 + 1 + 1 + 1 + 1
135+ assert len (res .rows ) == 1 + 1 + 1 + 1 + 1 + 1
134136
135137 @pytest .mark .timeout (30 )
136138 def test_build_single_edge (self , gen_graph ):
@@ -151,6 +153,8 @@ def test_build_single_edge(self, gen_graph):
151153 vertices = [to_label (cg , 1 , 0 , 0 , 0 , 0 ), to_label (cg , 1 , 0 , 0 , 0 , 1 )],
152154 edges = [(to_label (cg , 1 , 0 , 0 , 0 , 0 ), to_label (cg , 1 , 0 , 0 , 0 , 1 ), 0.5 )],
153155 )
156+ chunk_id = to_label (cg , 1 , 0 , 0 , 0 , 0 )
157+ assert cg .id_client .get_max_node_id (chunk_id ) == to_label (cg , 1 , 0 , 0 , 0 , 1 )
154158
155159 res = cg .client ._table .read_rows ()
156160 res .consume_all ()
@@ -183,7 +187,7 @@ def test_build_single_edge(self, gen_graph):
183187
184188 # Make sure there are not any more entries in the table
185189 # include counters, meta and version rows
186- assert len (res .rows ) == 2 + 1 + 1 + 1 + 1
190+ assert len (res .rows ) == 2 + 1 + 1 + 1 + 1 + 1
187191
188192 @pytest .mark .timeout (30 )
189193 def test_build_single_across_edge (self , gen_graph ):
@@ -285,7 +289,7 @@ def test_build_single_across_edge(self, gen_graph):
285289
286290 # Make sure there are not any more entries in the table
287291 # include counters, meta and version rows
288- assert len (res .rows ) == 2 + 2 + 1 + 3 + 1 + 1
292+ assert len (res .rows ) == 2 + 2 + 1 + 3 + 1 + 1 + 2
289293
290294 @pytest .mark .timeout (30 )
291295 def test_build_single_edge_and_single_across_edge (self , gen_graph ):
@@ -311,13 +315,19 @@ def test_build_single_edge_and_single_across_edge(self, gen_graph):
311315 ],
312316 )
313317
318+ chunk_id = to_label (cg , 1 , 0 , 0 , 0 , 0 )
319+ assert cg .id_client .get_max_node_id (chunk_id ) == to_label (cg , 1 , 0 , 0 , 0 , 1 )
320+
314321 # Chunk B
315322 create_chunk (
316323 cg ,
317324 vertices = [to_label (cg , 1 , 1 , 0 , 0 , 0 )],
318325 edges = [(to_label (cg , 1 , 1 , 0 , 0 , 0 ), to_label (cg , 1 , 0 , 0 , 0 , 0 ), inf )],
319326 )
320327
328+ chunk_id = to_label (cg , 1 , 1 , 0 , 0 , 0 )
329+ assert cg .id_client .get_max_node_id (chunk_id ) == to_label (cg , 1 , 1 , 0 , 0 , 0 )
330+
321331 add_parent_chunk (cg , 3 , np .array ([0 , 0 , 0 ]), n_threads = 1 )
322332 res = cg .client ._table .read_rows ()
323333 res .consume_all ()
@@ -393,7 +403,7 @@ def test_build_single_edge_and_single_across_edge(self, gen_graph):
393403
394404 # Make sure there are not any more entries in the table
395405 # include counters, meta and version rows
396- assert len (res .rows ) == 3 + 2 + 1 + 3 + 1 + 1
406+ assert len (res .rows ) == 3 + 2 + 1 + 3 + 1 + 1 + 2
397407
398408 @pytest .mark .timeout (120 )
399409 def test_build_big_graph (self , gen_graph ):
0 commit comments