mirror of https://github.com/milvus-io/milvus.git
Fix test case bug
Signed-off-by: del-zhenwu <zhenxiang.li@zilliz.com>pull/4973/head^2
parent
f853ddc030
commit
04c36eb8dd
|
@ -297,9 +297,9 @@ class TestReleaseAdvanced:
|
|||
connect.insert(collection, default_entities)
|
||||
connect.flush([collection])
|
||||
|
||||
def load(collection):
|
||||
def load():
|
||||
connect.load_collection(collection)
|
||||
t = threading.Thread(target=load, (collection, ))
|
||||
t = threading.Thread(target=load, args=())
|
||||
t.start()
|
||||
connect.release_collection(collection)
|
||||
res = connect.search(collection, default_single_query)
|
||||
|
@ -315,9 +315,9 @@ class TestReleaseAdvanced:
|
|||
connect.insert(collection, default_entities, partition_tag=default_tag)
|
||||
connect.flush([collection])
|
||||
|
||||
def load(collection):
|
||||
def load():
|
||||
connect.load_collection(collection)
|
||||
t = threading.Thread(target=load, (collection, ))
|
||||
t = threading.Thread(target=load, args=())
|
||||
t.start()
|
||||
connect.release_partitions(collection, [default_tag])
|
||||
res = connect.search(collection, default_single_query)
|
||||
|
@ -333,9 +333,9 @@ class TestReleaseAdvanced:
|
|||
connect.flush([collection])
|
||||
connect.load_collection(collection)
|
||||
|
||||
def insert(collection):
|
||||
def insert():
|
||||
connect.insert(collection, default_entities)
|
||||
t = threading.Thread(target=insert, (collection, ))
|
||||
t = threading.Thread(target=insert, args=())
|
||||
t.start()
|
||||
connect.release_collection(collection)
|
||||
res = connect.search(collection, default_single_query)
|
||||
|
|
|
@ -876,9 +876,9 @@ class TestInsertMultiCollections:
|
|||
connect.insert(collection, default_entities)
|
||||
connect.flush([collection])
|
||||
connect.load_collection(collection)
|
||||
def release(collection):
|
||||
def release():
|
||||
connect.release_collection(collection)
|
||||
t = threading.Thread(target=release, (collection, ))
|
||||
t = threading.Thread(target=release, args=())
|
||||
t.start()
|
||||
ids = connect.insert(collection, default_entities)
|
||||
assert len(ids) == default_nb
|
||||
|
|
|
@ -28,7 +28,7 @@ class TestConnect:
|
|||
'''
|
||||
res = connect.close()
|
||||
with pytest.raises(Exception) as e:
|
||||
res = connect.()
|
||||
res = connect.list_collections()
|
||||
|
||||
# TODO: remove
|
||||
def _test_disconnect_repeatedly(self, dis_connect, args):
|
||||
|
|
|
@ -6,6 +6,7 @@ import string
|
|||
import struct
|
||||
import logging
|
||||
import threading
|
||||
import traceback
|
||||
import time
|
||||
import copy
|
||||
import numpy as np
|
||||
|
@ -994,6 +995,7 @@ class TestThread(threading.Thread):
|
|||
super(TestThread, self).run()
|
||||
except BaseException as e:
|
||||
self.exc = e
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
def join(self):
|
||||
super(TestThread, self).join()
|
||||
|
|
Loading…
Reference in New Issue