Mercurial > hg > nginx-tests
comparison proxy_cache_lock.t @ 1021:ebdf239722b9
Tests: relaxed proxy_cache_lock.t nolock tests to fix on Solaris.
Assumed that the order of responses being arrived in nolock case may be ignored.
An important part of such case is that the only last response should be cached.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 02 Sep 2016 12:17:35 +0300 |
parents | 196d33c2bb45 |
children |
comparison
equal
deleted
inserted
replaced
1020:196d33c2bb45 | 1021:ebdf239722b9 |
---|---|
111 | 111 |
112 for my $i (1 .. 3) { | 112 for my $i (1 .. 3) { |
113 $sockets[$i] = http_get('/nolock', start => 1); | 113 $sockets[$i] = http_get('/nolock', start => 1); |
114 } | 114 } |
115 | 115 |
116 like(http_end($sockets[1]), qr/request 1/, 'nolock - first'); | 116 $rest = join '', map { http_end($sockets[$_]) } (1 .. 3); |
117 | 117 |
118 $rest = http_end($sockets[2]); | 118 like($rest, qr/request 1/, 'nolock - first'); |
119 $rest .= http_end($sockets[3]); | 119 like($rest, qr/request 3/, 'nolock - last'); |
120 | |
121 like($rest, qr/request (2.*request 3|3.*request 2)/s, 'nolock - rest'); | |
122 like(http_get('/nolock'), qr/request 3/, 'nolock - last cached'); | 120 like(http_get('/nolock'), qr/request 3/, 'nolock - last cached'); |
123 | 121 |
124 ############################################################################### | 122 ############################################################################### |
125 | 123 |
126 sub http_fake_daemon { | 124 sub http_fake_daemon { |