changeset 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 9339673bb454
children 1fe8d33f75ad
files proxy_unfinished.t
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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');