# HG changeset patch # User Sergey Kandaurov # Date 1475142732 -10800 # Node ID b82f54728e1444dac0f6e104e4c52e6dd8964f11 # Parent 9339673bb45469040b761a2b12f536e84e8e008d Tests: fixed test failure in proxy_unfinished.t with big buffers. Skip the "no proxy temp" test if the response is finished, namely, if a calculated content length of the chunked body matches the expected value. Although a finished response is sort of expected, it can be further split in chunks with a recent change f379b32e4733 (1.11.2) in sub filter module, which broke a pre-existing check for the finished response. diff --git a/proxy_unfinished.t b/proxy_unfinished.t --- a/proxy_unfinished.t +++ b/proxy_unfinished.t @@ -140,8 +140,15 @@ like(http_get('/un/big/ok', sleep => 0.1 # no final chunk chmod(0000, $t->testdir() . '/proxy_temp'); -like(http_get_11('/proxy/big.html', sleep => 0.5), - qr/X(?!.*\x0d\x0a?0\x0d\x0a?)|finished/s, 'no proxy temp'); + +my $r = http_get_11('/proxy/big.html', sleep => 0.5); + +SKIP: { +skip 'finished', 1 if length(Test::Nginx::http_content($r)) == 1024 * 1024 + 8; + +like($r, qr/X(?!.*\x0d\x0a?0\x0d\x0a?)/s, 'no proxy temp'); + +} chmod(0700, $t->testdir() . '/proxy_temp');