Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aggressive caching test failure on Windows #13

Open
jayvdb opened this issue Sep 21, 2020 · 0 comments
Open

aggressive caching test failure on Windows #13

jayvdb opened this issue Sep 21, 2020 · 0 comments

Comments

@jayvdb
Copy link
Owner

jayvdb commented Sep 21, 2020

https://ci.appveyor.com/project/jayvdb/dns-cache/builds/35321024/job/0msnu5mtn32u434c#L102

The hit which should have been cached in the upstream test method was not found/used in test_aggressive.py query, resulting in a real dns query. This is the first time it has occurred, so it is likely a very rare occasional, and the failure result is not critical unless the DNS caching was done because the DNS is no longer available.

self = <tests.test_aggressive.TestCache testMethod=test_hit_additional__<'208.98.188.82'>>
nameserver = '208.98.188.82'
    @foreach(get_nameservers())
    def test_hit_additional(self, nameserver=None):
        if not nameserver:
            raise unittest.SkipTest("unittest_expander leftover")
    
>       self._test_hit_additional(nameserver)
tests\test_upstream.py:612: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_aggressive.py:77: in _test_hit_additional
    answer = resolver.query(additional_a_names[0], A)
dns_cache\resolver.py:57: in query
    qname, rdtype=rdtype, rdclass=rdclass, **kwargs
.tox\py36-noapsw\lib\site-packages\dns\resolver.py:1091: in query
    True)
dns_cache\resolver.py:36: in resolve
    raise_on_no_answer, source_port, lifetime,
.tox\py36-noapsw\lib\site-packages\dns\resolver.py:1067: in resolve
    (_, done) = resolution.query_result(None, ex)
dns_cache\block.py:22: in _socket_factory_exception_handler
    raise ex
.tox\py36-noapsw\lib\site-packages\dns\resolver.py:1059: in resolve
    raise_on_truncation=True)
.tox\py36-noapsw\lib\site-packages\dns\query.py:526: in udp
    s = stack.enter_context(_make_socket(af, socket.SOCK_DGRAM, source))
.tox\py36-noapsw\lib\site-packages\dns\query.py:263: in _make_socket
    s = socket_factory(af, type)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>), kwargs = {}
    def _socket_factory_blocker(*args, **kwargs):
>       raise _SocketBlockedError()
E       dns_cache.block._SocketBlockedError: _socket_factory_blocker invoked
dns_cache\block.py:18: _SocketBlockedError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant