We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f0476 commit 8c499bdCopy full SHA for 8c499bd
sdks/python/conftest.py
@@ -155,22 +155,23 @@ def ensure_clean_state(request):
155
156
enable_cleanup = _should_enable_test_cleanup(request.config)
157
158
- gc.collect()
+ if enable_cleanup:
159
+ gc.collect()
160
161
thread_count = threading.active_count()
162
if thread_count > 50:
163
print(f"Warning: {thread_count} active threads detected before test")
164
if enable_cleanup:
165
time.sleep(0.5)
166
167
168
yield
169
170
try:
171
172
173
time.sleep(0.1)
174
175
except Exception as e:
176
print(f"Warning: Cleanup error: {e}")
177
0 commit comments