]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests/config: increate http timeouts to 16s
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 10 Nov 2021 13:12:09 +0000 (14:12 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 23 Nov 2021 14:34:38 +0000 (15:34 +0100)
On some platforms in CI, even 8s doesn't seem sufficient enough to
guarantee stability. Hopefully this improves the situation.

modules/daf/daf_http.test.lua
modules/http/http.test.lua
modules/http/http_doh.test.lua
modules/http/test_tls/tls.test.lua
tests/config/doh2.test.lua

index d89b180db1daaa88c9b5d532607338d568e000e9..20d5f9058b7154c04ce1263b4926f43d0004d6db 100644 (file)
@@ -37,7 +37,7 @@ else
 
        -- helper for returning useful values to test on
 --     local function http_get(uri)
---             local headers, stream = assert(request.new_from_uri(uri):go())
+--             local headers, stream = assert(request.new_from_uri(uri):go(16))
 --             local body = assert(stream:get_body_as_string())
 --             return tonumber(headers:get(':status')), body, headers:get('content-type')
 --     end
@@ -46,7 +46,7 @@ else
                local req = assert(request.new_from_uri(baseuri .. uri))
                req.headers:upsert(':method', method)
                req:set_body(reqbody)
-               local headers, stream = assert(req:go())
+               local headers, stream = assert(req:go(16))
                local ansbody = assert(stream:get_body_as_string())
                return tonumber(headers:get(':status')), ansbody, headers:get('content-type')
        end
index 2d0752fffb53a2f6ac2faca39c90a06823c3f596..b882f1073876387f7f5166ffbddc488b4efb9368 100644 (file)
@@ -45,7 +45,7 @@ else
 
        -- helper for returning useful values to test on
        local function http_get(uri)
-               local headers, stream = assert(request.new_from_uri(uri .. '/'):go())
+               local headers, stream = assert(request.new_from_uri(uri .. '/'):go(16))
                local body = assert(stream:get_body_as_string())
                return tonumber(headers:get(':status')), body, headers:get('content-type')
        end
index 60f5cc0a98ee126fa9610ea7e5be1866f9cdc1a9..f0685cb152acdcb50139ecc9dbe33086a33a1442 100644 (file)
@@ -49,7 +49,7 @@ function parse_pkt(input, desc)
 end
 
 local function check_ok(req, desc)
-       local headers, stream, errno = req:go(8)  -- randomly chosen timeout by tkrizek
+       local headers, stream, errno = req:go(16)
        if errno then
                local errmsg = stream
                nok(errmsg, desc .. ': ' .. errmsg)
@@ -63,7 +63,7 @@ local function check_ok(req, desc)
 end
 
 local function check_err(req, exp_status, desc)
-       local headers, errmsg, errno = req:go(8)  -- randomly chosen timeout by tkrizek
+       local headers, errmsg, errno = req:go(16)
        if errno then
                nok(errmsg, desc .. ': ' .. errmsg)
                return
index 481d7b87f7b94c3c7392f693f3b9860ef4bad463..7d5c437bb6c68087558ea87356140ec5f9c9d8eb 100644 (file)
@@ -43,7 +43,7 @@ else
                        req.ctx:setVerify(openssl_ctx.VERIFY_NONE)
                end
 
-               local headers = assert(req:go())
+               local headers = assert(req:go(16))
                return tonumber(headers:get(':status'))
        end
 
@@ -168,7 +168,7 @@ else
                        store:add('ca.crt')
                        req.ctx:setVerify(openssl_ctx.VERIFY_PEER)
 
-                       local headers = assert(req:go())
+                       local headers = assert(req:go(16))
                        local code = tonumber(headers:get(':status'))
                        same(code, 200, desc)
                end
index 069e72b75481135ecf6c3a72c1364ad6535a4c1d..ef43256335ea03e5ff5b3855a724b8f3468c80f5 100644 (file)
@@ -50,7 +50,7 @@ function parse_pkt(input, desc)
 end
 
 local function check_ok(req, desc)
-       local headers, stream, errno = req:go(8)  -- randomly chosen timeout by tkrizek
+       local headers, stream, errno = req:go(16)
        if errno then
                local errmsg = stream
                nok(errmsg, desc .. ': ' .. errmsg)
@@ -64,7 +64,7 @@ local function check_ok(req, desc)
 end
 
 --local function check_err(req, exp_status, desc)
---     local headers, errmsg, errno = req:go(8)  -- randomly chosen timeout by tkrizek
+--     local headers, errmsg, errno = req:go(16)
 --     if errno then
 --             nok(errmsg, desc .. ': ' .. errmsg)
 --             return