File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 33"""
44
55import json
6- import threading
76import time
87from io import BytesIO
98
1413from UnleashClient .cache import FileCache
1514
1615
17- def cleanup_threads ():
18- """Wait for all background threads to finish."""
19- for thread in threading .enumerate ():
20- if thread != threading .current_thread () and thread .is_alive ():
21- if (
22- hasattr (thread , "_stop" )
23- or "unleash" in thread .name .lower ()
24- or "scheduler" in thread .name .lower ()
25- ):
26- try :
27- thread .join (timeout = 2.0 )
28- except Exception :
29- pass
30-
31-
3216@pytest .fixture (autouse = True )
3317def reset_instances (tmp_path ):
3418 """Reset instances before each test and ensure clean cache."""
3519 INSTANCES ._reset ()
3620 yield
37- cleanup_threads ()
3821
3922
4023@pytest .fixture
You can’t perform that action at this time.
0 commit comments