diff --git a/tests/python_test/collection/test_load_collection.py b/tests/python_test/collection/test_load_collection.py index 779475286d..78a19ba9bd 100644 --- a/tests/python_test/collection/test_load_collection.py +++ b/tests/python_test/collection/test_load_collection.py @@ -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) diff --git a/tests/python_test/entity/test_insert.py b/tests/python_test/entity/test_insert.py index 6dececd445..bbbc478a0d 100644 --- a/tests/python_test/entity/test_insert.py +++ b/tests/python_test/entity/test_insert.py @@ -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 diff --git a/tests/python_test/test_connect.py b/tests/python_test/test_connect.py index 9d4dc5a1b8..46d7131b88 100644 --- a/tests/python_test/test_connect.py +++ b/tests/python_test/test_connect.py @@ -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): diff --git a/tests/python_test/utils.py b/tests/python_test/utils.py index 1b214458fc..7ad9893f3c 100644 --- a/tests/python_test/utils.py +++ b/tests/python_test/utils.py @@ -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()