From 9944e28a06cf1dda3bb2c60e41750a1b3bde6c7b Mon Sep 17 00:00:00 2001 From: tanishqtayade Date: Fri, 26 Jun 2026 12:09:11 +0530 Subject: [PATCH] test: drop misleading threaded resolver test it was writing directly to dnscache, not actually going through CachingThreadedResolver at all. the threaded resolver already has its own if dnscache.limit: guard so the bug doesnt affect it anyway. keeping only the hostname resolver test which covers the actual bug path through _CachingResolutionReceiver --- tests/test_resolver.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/test_resolver.py b/tests/test_resolver.py index 66ebe57f8..59afa4c27 100644 --- a/tests/test_resolver.py +++ b/tests/test_resolver.py @@ -75,12 +75,3 @@ def test_caching_hostname_resolver_dnscache_disabled_rejects_storage(): # dnscache should remain empty despite address being resolved assert "example.com" not in dnscache assert len(dnscache) == 0 - - -def test_caching_threaded_resolver_dnscache_disabled_rejects_storage(): - # Regression test: when DNSCACHE_ENABLED=False, resolved DNS results - # should not be stored in dnscache even after successful resolution. - dnscache.limit = 0 - dnscache["example.com"] = "1.2.3.4" - assert "example.com" not in dnscache - assert len(dnscache) == 0