Skip to content

Commit f6a3a00

Browse files
author
rodrigo.nogueira
committed
test: add delay after gc.collect() to test async finalization
1 parent f905bc7 commit f6a3a00

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_proxy_functional.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def secure_proxy_url(tls_certificate_pem_path: str) -> Iterator[URL]:
9494
# pytest cleanup. A longer delay + multiple gc.collect() passes ensures
9595
# the proxy threads finish cleanup before pytest's unraisableexception
9696
# plugin collects warnings.
97-
# TEMPORARY: Using 5 second delay to test if this is the source of leaks
97+
# TEMPORARY: Testing with delays before AND after gc.collect()
9898
if os.name == "nt":
9999
import gc
100100
import time
@@ -103,6 +103,7 @@ def secure_proxy_url(tls_certificate_pem_path: str) -> Iterator[URL]:
103103
gc.collect()
104104
gc.collect()
105105
gc.collect()
106+
time.sleep(1)
106107

107108

108109
@pytest.fixture

0 commit comments

Comments
 (0)