# HG changeset patch # User Maxim Dounin # Date 1519657772 -10800 # Node ID 3bc5df417f623f6f124f193a2479bd035e3be10b # Parent 5ac4aae1a740d165d01b44e8f61c12ee8de967f0 Tests: adjusted proxy variables time checks. Strict ">= 1" check may fail if timekeeping is not precise, and sleep(1) results in something like 0.999 time in headers. In particular, this happens when using clock_gettime(CLOCK_MONOTONIC_COARSE) for ngx_current_msec on Ubuntu 16.04. To fix this, sleep(1) replaced with select(1.1). diff --git a/proxy_variables.t b/proxy_variables.t --- a/proxy_variables.t +++ b/proxy_variables.t @@ -170,12 +170,12 @@ sub http_daemon { if ($uri =~ 'bad' && $once) { $once = 0; - sleep 1; + select undef, undef, undef, 1.1; next; } if ($uri =~ 'header') { - sleep 1; + select undef, undef, undef, 1.1; } print $client <