Mercurial > hg > nginx-tests
annotate image_filter_finalize.t @ 955:b8948aecba12
Tests: HTTP/2 request body Content-Length tests in proxied request.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 21 Jun 2016 20:46:10 +0300 |
parents | e9064d691790 |
children | 882267679006 |
rev | line source |
---|---|
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 # (C) Maxim Dounin |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
5 # Tests for http filter finalize code. |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 ############################################################################### |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 use warnings; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 use strict; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
12 use Test::More; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 BEGIN { use FindBin; chdir($FindBin::Bin); } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 use lib 'lib'; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 use Test::Nginx; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
18 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
19 ############################################################################### |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 select STDERR; $| = 1; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 select STDOUT; $| = 1; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
574
2cd00179f4b2
Tests: has_feature() introduced in Test::Nginx.
Sergey Kandaurov <pluknet@nginx.com>
parents:
568
diff
changeset
|
24 my $t = Test::Nginx->new()->has(qw/http proxy cache image_filter limit_req/) |
593
6c0a5903d0ae
Tests: cleanup now duplicating tests for no alerts.
Sergey Kandaurov <pluknet@nginx.com>
parents:
574
diff
changeset
|
25 ->has(qw/rewrite shmem/)->plan(3) |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 ->write_file_expand('nginx.conf', <<'EOF'); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 %%TEST_GLOBALS%% |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 daemon off; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 events { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 http { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 %%TEST_GLOBALS_HTTP%% |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 proxy_cache_path %%TESTDIR%%/cache keys_zone=cache:1m; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 |
678
99233cfefbbe
Tests: adjusted test timeouts.
Sergey Kandaurov <pluknet@nginx.com>
parents:
593
diff
changeset
|
40 limit_req_zone $binary_remote_addr zone=limit:1m rate=25r/m; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 log_format time "$request_uri:$status:$upstream_response_time"; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 access_log time.log time; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 upstream u { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
46 server 127.0.0.1:%%PORT_1%%; |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
47 server 127.0.0.1:%%PORT_1%%; |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
48 server 127.0.0.1:%%PORT_1%%; |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
49 server 127.0.0.1:%%PORT_1%%; |
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
50 server 127.0.0.1:%%PORT_0%%; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 server { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
54 listen 127.0.0.1:%%PORT_0%%; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 server_name localhost; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 # this used to cause a segmentation fault before 07f028df3879 (1.3.1) |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 # http://nginx.org/pipermail/nginx/2011-January/024703.html |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 location /t1 { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
61 proxy_pass http://127.0.0.1:%%PORT_0%%/bad; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 proxy_cache cache; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 proxy_cache_valid any 1h; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
64 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 image_filter resize 150 100; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 error_page 415 = /empty; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
67 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
68 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 location /empty { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 return 204; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 location /bad { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 return 404; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 # another segfault, introduced in 204b780a89de (1.3.0), |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
78 # fixed in 07f028df3879 (1.3.1) |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 location /t2 { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
81 proxy_pass http://127.0.0.1:%%PORT_0%%/big; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
82 proxy_store on; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 image_filter_buffer 10m; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 image_filter resize 150 100; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 error_page 415 = /empty; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
89 location /big { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 # big enough static file |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
91 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 # filter finalization may cause duplicate upstream finalization, |
538 | 94 # resulting in wrong $upstream_response_time, |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 # http://nginx.org/pipermail/nginx-devel/2015-February/006539.html |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 # note that we'll need upstream response time to be at least 1 second, |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
98 # and at least 4 failed requests to make sure r->upstream_states will |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
99 # not be reallocated |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
100 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
101 location /t3 { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
102 proxy_pass http://u/slow; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
103 proxy_buffering off; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
104 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
105 image_filter resize 150 100; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 error_page 415 = /upstream; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
107 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
108 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 location /slow { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
110 limit_req zone=limit burst=5; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
113 location /upstream { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
114 proxy_pass http://127.0.0.1:%%PORT_0%%/empty; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
115 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
116 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
117 location /time.log { |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
118 # access to log |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
119 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
121 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 server { |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
894
diff
changeset
|
123 listen 127.0.0.1:%%PORT_1%%; |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 server_name localhost; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 return 444; |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 } |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 EOF |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 $t->write_file('big', "x" x 10240000); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 $t->write_file('slow', "x"); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
133 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 $t->run(); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 ############################################################################### |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
138 like(http_get('/t1'), qr/HTTP/, 'image filter and cache'); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
139 like(http_get('/t2'), qr/HTTP/, 'image filter and store'); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
140 |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
141 http_get('/slow'); |
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 http_get('/t3'); |
533
a5465130d3df
Tests: relaxed timeouts in filter_finalize tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
528
diff
changeset
|
143 like(http_get('/time.log'), qr!/t3:.*, [1-9]\.!, 'upstream response time'); |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
144 |
894
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
145 # "aio_write" is used to produce the following alert on some platforms: |
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
146 # "readv() failed (9: Bad file descriptor) while reading upstream" |
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
147 |
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
148 $t->todo_alerts() if $t->read_file('nginx.conf') =~ /aio_write on/ |
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
149 and $t->read_file('nginx.conf') =~ /aio threads/; |
f50ee6804216
Tests: TODO image_filter_finalize.t alert seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents:
678
diff
changeset
|
150 |
525
13eafeb7d9cb
Tests: some filter_finalize tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 ############################################################################### |