Mercurial > hg > nginx-tests
diff proxy_unfinished.t @ 1043:b82f54728e14
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.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 29 Sep 2016 12:52:12 +0300 |
parents | 196d33c2bb45 |
children | 8659123d2d37 |
line wrap: on
line diff
--- a/proxy_unfinished.t Mon Sep 26 17:06:09 2016 +0300 +++ b/proxy_unfinished.t Thu Sep 29 12:52:12 2016 +0300 @@ -140,8 +140,15 @@ # 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');