changeset 665:3a8dc14b98ba

Tests: fixed Upgrade handling tests without client abort detection. Ignore bytes sent on non-upgraded connection, which may be non-zero if client connection close was not detected.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 27 Aug 2015 13:33:41 +0300
parents 97660514e518
children 64f22e0aaab2
files proxy_upgrade.t ssl_proxy_upgrade.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/proxy_upgrade.t
+++ b/proxy_upgrade.t
@@ -138,7 +138,7 @@ open my $f, '<', "$d/cc.log" or die "Can
 
 is($f->getline(), shift (@r) . " 540793\n", 'log - bytes');
 is($f->getline(), shift (@r) . " 22\n", 'log - bytes pipelined');
-is($f->getline(), "0 0\n", 'log - bytes noupgrade');
+like($f->getline(), qr/\d+ 0\n/, 'log - bytes noupgrade');
 
 ###############################################################################
 
--- a/ssl_proxy_upgrade.t
+++ b/ssl_proxy_upgrade.t
@@ -164,7 +164,7 @@ open my $f, '<', "$d/cc.log" or die "Can
 
 is($f->getline(), shift (@r) . " 540793\n", 'log - bytes');
 is($f->getline(), shift (@r) . " 22\n", 'log - bytes pipelined');
-is($f->getline(), "0 0\n", 'log - bytes noupgrade');
+like($f->getline(), qr/\d+ 0\n/, 'log - bytes noupgrade');
 
 ###############################################################################