Skip to content

Commit 102c2b8

Browse files
committed
IGNITE-27373 Fix error
1 parent 7654a48 commit 102c2b8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

modules/platforms/python/dbapi/tests/test_concurrency.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ def table(table_name, service_cursor, drop_table_cleanup):
4545
def run_threads(fn, n=NUM_THREADS, *args):
4646
barrier = threading.Barrier(n)
4747
errors = []
48+
errors_lock = threading.Lock()
4849

4950
def wrapper(tid):
5051
try:
5152
barrier.wait()
5253
fn(tid, *args)
5354
except Exception as e:
54-
errors.append(e)
55+
with errors_lock:
56+
errors.append(e)
5557

5658
threads = [threading.Thread(target=wrapper, args=(i,)) for i in range(n)]
5759
for t in threads:

0 commit comments

Comments
 (0)