Changeset 1043:b82f54728e14 in nginx-tests


Ignore:
Timestamp:
09/29/16 09:52:12 (4 years ago)
Author:
Sergey Kandaurov <pluknet@…>
Branch:
default
Phase:
public
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proxy_unfinished.t

    r1020 r1043  
    141141
    142142chmod(0000, $t->testdir() . '/proxy_temp');
    143 like(http_get_11('/proxy/big.html', sleep => 0.5),
    144         qr/X(?!.*\x0d\x0a?0\x0d\x0a?)|finished/s, 'no proxy temp');
     143
     144my $r = http_get_11('/proxy/big.html', sleep => 0.5);
     145
     146SKIP: {
     147skip 'finished', 1 if length(Test::Nginx::http_content($r)) == 1024 * 1024 + 8;
     148
     149like($r, qr/X(?!.*\x0d\x0a?0\x0d\x0a?)/s, 'no proxy temp');
     150
     151}
    145152
    146153chmod(0700, $t->testdir() . '/proxy_temp');
Note: See TracChangeset for help on using the changeset viewer.