@@ -248,8 +248,7 @@ def test_update_record_by_text(self, collection_id, record_id, text_splitter):
248
248
res = update_record (** update_record_data )
249
249
res_dict = vars (res )
250
250
assume_record_result (update_record_data , res_dict )
251
- time .sleep (2 )
252
- records = list_records (collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
251
+
253
252
254
253
@pytest .mark .run (order = 34 )
255
254
@pytest .mark .parametrize ("text_splitter" , text_splitter_list )
@@ -268,8 +267,7 @@ def test_update_record_by_web(self, collection_id, record_id, text_splitter):
268
267
res = update_record (** update_record_data )
269
268
res_dict = vars (res )
270
269
assume_record_result (update_record_data , res_dict )
271
- time .sleep (2 )
272
- records = list_records (collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
270
+
273
271
274
272
@pytest .mark .run (order = 35 )
275
273
@pytest .mark .parametrize ("upload_file_data" , upload_file_data_list [2 :3 ])
@@ -295,8 +293,7 @@ def test_update_record_by_file(self, collection_id, record_id, upload_file_data)
295
293
res = update_record (** update_record_data )
296
294
res_dict = vars (res )
297
295
assume_record_result (update_record_data , res_dict )
298
- time .sleep (2 )
299
- records = list_records (collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
296
+
300
297
301
298
@pytest .mark .run (order = 79 )
302
299
def test_delete_record (self , collection_id ):
@@ -339,6 +336,7 @@ def test_query_chunks(self, collection_id):
339
336
340
337
@pytest .mark .run (order = 42 )
341
338
def test_create_chunk (self , collection_id ):
339
+ time .sleep (2 )
342
340
# Create a chunk.
343
341
create_chunk_data = {
344
342
"collection_id" : collection_id ,
@@ -399,23 +397,32 @@ def test_update_chunk(self, collection_id, chunk_id):
399
397
res = update_chunk (** update_chunk_data )
400
398
res_dict = vars (res )
401
399
assume_chunk_result (update_chunk_data , res_dict )
402
- records = list_records ( collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
400
+
403
401
404
402
@pytest .mark .run (order = 46 )
405
- def test_delete_chunk (self , collection_id ):
403
+ def test_delete_chunk (self , collection_id , chunk_id ):
406
404
# List chunks.
407
405
408
- chunks = list_chunks (collection_id = collection_id , limit = 5 )
409
- for index , chunk in enumerate (chunks ):
410
- chunk_id = chunk .chunk_id
411
-
412
- # Delete a chunk.
413
-
414
- delete_chunk (collection_id = collection_id , chunk_id = chunk_id )
406
+ # chunks = list_chunks(collection_id=collection_id, limit=5)
407
+ # for index, chunk in enumerate(chunks):
408
+ # chunk_id = chunk.chunk_id
409
+ #
410
+ # # Delete a chunk.
411
+ #
412
+ # delete_chunk(collection_id=collection_id, chunk_id=chunk_id)
413
+ #
414
+ # # List chunks.
415
+ #
416
+ # new_chunks = list_chunks(collection_id=collection_id)
417
+ # chunk_ids = [chunk.chunk_id for chunk in new_chunks]
418
+ # pytest.assume(chunk_id not in chunk_ids)
419
+ # records = list_records(collection_id=collection_id, order="desc", limit=20, after=None, before=None)
420
+ # for record in records:
421
+ delete_chunk (collection_id = collection_id , chunk_id = chunk_id )
415
422
416
- # List chunks.
423
+ # List chunks.
417
424
418
- new_chunks = list_chunks (collection_id = collection_id )
419
- chunk_ids = [chunk .chunk_id for chunk in new_chunks ]
420
- pytest .assume (chunk_id not in chunk_ids )
421
- records = list_records (collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
425
+ new_chunks = list_chunks (collection_id = collection_id )
426
+ chunk_ids = [chunk .chunk_id for chunk in new_chunks ]
427
+ pytest .assume (chunk_id not in chunk_ids )
428
+ records = list_records (collection_id = collection_id , order = "desc" , limit = 20 , after = None , before = None )
0 commit comments