Mercurial > hg > nginx-tests
comparison proxy_cache_lock.t @ 568:907e89fba9c3
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sun, 03 May 2015 12:45:09 +0300 |
parents | 28a8248740ca |
children | 2cd00179f4b2 |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 plan(skip_all => 'win32') if $^O eq 'MSWin32'; | 24 plan(skip_all => 'win32') if $^O eq 'MSWin32'; |
25 | 25 |
26 my $t = Test::Nginx->new()->has(qw/http proxy cache/) | 26 my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(18) |
27 ->write_file_expand('nginx.conf', <<'EOF'); | 27 ->write_file_expand('nginx.conf', <<'EOF'); |
28 | 28 |
29 %%TEST_GLOBALS%% | 29 %%TEST_GLOBALS%% |
30 | 30 |
31 daemon off; | 31 daemon off; |
67 | 67 |
68 EOF | 68 EOF |
69 | 69 |
70 $t->run_daemon(\&http_fake_daemon); | 70 $t->run_daemon(\&http_fake_daemon); |
71 | 71 |
72 $t->run()->plan(18); | 72 $t->run(); |
73 | 73 |
74 $t->waitforsocket('127.0.0.1:8081'); | 74 $t->waitforsocket('127.0.0.1:8081'); |
75 | 75 |
76 ############################################################################### | 76 ############################################################################### |
77 | 77 |
105 | 105 |
106 my $rest = http_end($sockets[2]); | 106 my $rest = http_end($sockets[2]); |
107 $rest .= http_end($sockets[3]); | 107 $rest .= http_end($sockets[3]); |
108 | 108 |
109 like($rest, qr/request (2.*request 3|3.*request 2)/s, 'lock timeout - rest'); | 109 like($rest, qr/request (2.*request 3|3.*request 2)/s, 'lock timeout - rest'); |
110 | |
111 TODO: { | |
112 local $TODO = 'behavior change' unless $t->has_version('1.7.8'); | |
113 | |
114 like(http_get('/timeout'), qr/request 1/, 'lock timeout - first only cached'); | 110 like(http_get('/timeout'), qr/request 1/, 'lock timeout - first only cached'); |
115 | |
116 } | |
117 | 111 |
118 # no lock | 112 # no lock |
119 | 113 |
120 for my $i (1 .. 3) { | 114 for my $i (1 .. 3) { |
121 $sockets[$i] = http_get('/nolock', start => 1); | 115 $sockets[$i] = http_get('/nolock', start => 1); |