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 index ada3f0a..b6fe3a3 100644 --- a/proxy_variables.t +++ b/proxy_variables.t
@@ -170,12 +170,12 @@ 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 <<EOF; @@ -186,7 +186,7 @@ EOF if ($uri =~ 'body') { - sleep 1; + select undef, undef, undef, 1.1; } print $client 'AND-THIS';