~ubuntu-branches/ubuntu/saucy/nginx/saucy-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-echo/t/blocking-sleep.t

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Cyril Lavier, Michael Lustfield, Kartik Mistry
  • Date: 2012-05-14 11:15:00 UTC
  • mfrom: (4.2.49 sid)
  • Revision ID: package-import@ubuntu.com-20120514111500-1y9ij7zulu9xnmry
Tags: 1.2.0-1
[Cyril Lavier]
* New upstream release. (Closes: #670306)
  + 1.2.x is stable release now.
* debian/modules/chunkin-nginx-module:
  + Updated chunkin-nginx-module to v0.23rc2-3-g85eca98.
* debian/modules/headers-more-module:
  + Updated headers-more-module to v0.17rc1-4-g33a82ed.
* debian/modules/nginx-development-kit:
  + Updated nginx-development-kit to v0.2.17-7-g24202b4.
* debian/modules/nginx-echo:
  + Updated nginx-echo to v0.38rc2-7-g080c0a1.
* debian/modules/nginx-lua:
  + Updated nginx-lua to v0.5.0rc25-5-g8d28785.
* debian/modules/nginx-upstream-fair:
  + Updated nginx-upstream-fair to a18b409.
* debian/modules/nginx-upload-progress:
  + Updated nginx-upload-progress to v0.9.0-0-ga788dea.
* debian/modules/naxsi:
  + Updated naxsi to 0.46
* debian/modules/README.Modules-versions:
  + Updated versions and URLs for modules.
* debian/naxsi-ui-extract, debian/naxsi-ui-intercept,
  debian/nginx-naxsi-ui.*, debian/naxsi-ui-extract.1,
  debian/naxsi-ui-intercept.1, debian/rules:
  + Added nginx-naxsi-ui package containing the learning daemon
    and the WebUI.
* debian/nginx-common.nginx.default, debian/nginx-common.nginx.init:
  + Renamed files to be compliant with the nginx-naxsi-ui package.
* debian/po:
  + Added needed files for using po-debconf.
  + Added French translation.
* debian/control:
  + Applied the modifications given after the review by Justin Rye.

[Michael Lustfield]
* debian/conf/uwsgi_params:
  + Added UWSGI_SCHEME to uwsgi_params. (Closes: #664878)
* debian/conf/sites-available/default:
  + Added allow directive for ipv6 localhost. (Closes: #664271)

[Kartik Mistry]
* debian/control:
  + wrap-and-sort.
* debian/copyright:
  + Added missing copyrights, minor formatting fixes.
* debian/nginx-common.nginx.init:
  + Added ulimit for restarts, Thanks to Daniel Roschka
    <danielroschka@phoenitydawn.de> for patch. (Closes: #673580)
* debian/conf/sites-available/default:
  + Added patch to fix deprecated "listen" directive, Thanks to
    Guillaume Plessis <gui@dotdeb.org> for patch. (Closes: #672632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vi:filetype=
 
2
 
 
3
use lib 'lib';
 
4
use Test::Nginx::Socket;
 
5
 
 
6
plan tests => 2 * blocks();
 
7
 
 
8
#$Test::Nginx::LWP::LogLevel = 'debug';
 
9
 
 
10
run_tests();
 
11
 
 
12
__DATA__
 
13
 
 
14
=== TEST 1: sanity
 
15
--- config
 
16
    location /echo {
 
17
        echo_blocking_sleep 1;
 
18
    }
 
19
--- request
 
20
    GET /echo
 
21
--- response_body
 
22
 
 
23
 
 
24
 
 
25
=== TEST 2: fractional delay
 
26
--- config
 
27
    location /echo {
 
28
        echo_blocking_sleep 0.01;
 
29
    }
 
30
--- request
 
31
    GET /echo
 
32
--- response_body
 
33
 
 
34
 
 
35
 
 
36
=== TEST 3: leading echo
 
37
--- config
 
38
    location /echo {
 
39
        echo before...;
 
40
        echo_blocking_sleep 0.01;
 
41
    }
 
42
--- request
 
43
    GET /echo
 
44
--- response_body
 
45
before...
 
46
 
 
47
 
 
48
 
 
49
=== TEST 4: trailing echo
 
50
--- config
 
51
    location /echo {
 
52
        echo_blocking_sleep 0.01;
 
53
        echo after...;
 
54
    }
 
55
--- request
 
56
    GET /echo
 
57
--- response_body
 
58
after...
 
59
 
 
60
 
 
61
 
 
62
=== TEST 5: two echos around sleep
 
63
--- config
 
64
    location /echo {
 
65
        echo before...;
 
66
        echo_blocking_sleep 0.01;
 
67
        echo after...;
 
68
    }
 
69
--- request
 
70
    GET /echo
 
71
--- response_body
 
72
before...
 
73
after...
 
74
 
 
75
 
 
76
 
 
77
=== TEST 6: interleaving sleep and echo
 
78
--- config
 
79
    location /echo {
 
80
        echo 1;
 
81
        echo_blocking_sleep 0.01;
 
82
        echo 2;
 
83
        echo_blocking_sleep 0.01;
 
84
    }
 
85
--- request
 
86
    GET /echo
 
87
--- response_body
 
88
1
 
89
2
 
90
 
 
91
 
 
92
 
 
93
=== TEST 7: interleaving sleep and echo with echo at the end...
 
94
--- config
 
95
    location /echo {
 
96
        echo 1;
 
97
        echo_blocking_sleep 0.01;
 
98
        echo 2;
 
99
        echo_blocking_sleep 0.01;
 
100
        echo 3;
 
101
    }
 
102
--- request
 
103
    GET /echo
 
104
--- response_body
 
105
1
 
106
2
 
107
3
 
108
 
 
109
 
 
110
 
 
111
=== TEST 8: flush before sleep
 
112
we didn't really test the actual effect of "echo_flush" here...
 
113
merely checks if it croaks if appears.
 
114
--- config
 
115
    location /flush {
 
116
        echo hi;
 
117
        echo_flush;
 
118
        echo_blocking_sleep 0.01;
 
119
        echo trees;
 
120
    }
 
121
--- request
 
122
    GET /flush
 
123
--- response_body
 
124
hi
 
125
trees
 
126
 
 
127
 
 
128
 
 
129
=== TEST 9: flush does not increment opcode pointer itself
 
130
--- config
 
131
    location /flush {
 
132
        echo hi;
 
133
        echo_flush;
 
134
        echo trees;
 
135
    }
 
136
--- request
 
137
    GET /flush
 
138
--- response_body
 
139
hi
 
140
trees
 
141
 
 
142
 
 
143
 
 
144
=== TEST 10: blocking sleep by variable
 
145
--- config
 
146
    location ~ ^/sleep/(.+) {
 
147
        echo before...;
 
148
        echo_blocking_sleep $1;
 
149
        echo after...;
 
150
    }
 
151
--- request
 
152
    GET /sleep/0.01
 
153
--- response_body
 
154
before...
 
155
after...
 
156