mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
pytest: test threaded resolver
Add `resolv-threaded` to curlinfo to detect use of the threaded resolver correctly even with c-ares linked to https-rr. Run test_21_05 exactly when threaded resolver is built. Closes #21287
This commit is contained in:
parent
879209fc88
commit
a483128b01
3 changed files with 14 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ class TestResolve:
|
|||
assert os.path.exists(dfiles[1])
|
||||
|
||||
# use .invalid host name, parallel, single resolve thread
|
||||
@pytest.mark.skipif(condition=Env.curl_uses_lib('c-ares'), reason="c-ares resolver skipped")
|
||||
@pytest.mark.skipif(condition=not Env.curl_resolv_threaded(), reason="no threaded resolver")
|
||||
def test_21_05_resolv_single_thread(self, env: Env, httpd, nghttpx):
|
||||
count = 10
|
||||
delay_ms = 50
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ class EnvConfig:
|
|||
self.curl_is_verbose = 'verbose-strings: ON' in p.stdout
|
||||
self.curl_can_cert_status = 'cert-status: ON' in p.stdout
|
||||
self.curl_override_dns = 'override-dns: ON' in p.stdout
|
||||
self.curl_resolv_threaded = 'resolv-threaded: ON' in p.stdout
|
||||
|
||||
self.ports = {}
|
||||
|
||||
|
|
@ -515,6 +516,10 @@ class Env:
|
|||
def curl_override_dns() -> bool:
|
||||
return Env.CONFIG.curl_override_dns
|
||||
|
||||
@staticmethod
|
||||
def curl_resolv_threaded() -> bool:
|
||||
return Env.CONFIG.curl_resolv_threaded
|
||||
|
||||
@staticmethod
|
||||
def curl_can_early_data() -> bool:
|
||||
if Env.curl_uses_lib('gnutls'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue