fix: proxy rotation page pool leak

This commit is contained in:
yetval
2026-04-02 11:57:17 -04:00
parent 966e17a1dc
commit 6c6aabeb73
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -84,6 +84,15 @@ class TestPagePool:
with pytest.raises(RuntimeError):
pool.add_page(Mock())
def test_proxy_rotation_pool_leak(self):
pool = PagePool(max_pages=1)
page_info = pool.add_page(Mock())
assert pool.pages_count == 1
pool.pages.remove(page_info)
assert pool.pages_count == 0
pool.add_page(Mock())
assert pool.pages_count == 1
def test_cleanup_error_pages(self):