4 skip_models StreamResponseEpoll
6 t_plan
7 "ensure close-on-exec flag is set for $model"
8 t_begin
"setup and start" && {
9 rainbows_setup
$model 1 1
10 nr
=$nr rainbows
-E none
-D fork-sleep.ru
-c $unicorn_config
14 t_begin
"send keepalive req expect it to timeout in ~1s" && {
15 req
='GET / HTTP/1.1\r\nHost: example.com\r\n\r\n'
22 ) | socat
- TCP
:$listen > $fifo
24 elapsed
=$
(( $now - $t0 ))
25 t_info
"elapsed=$elapsed (expecting >=1s)"
29 t_begin
'sleep process is still running' && {
30 sleep_pid
="$(tail -1 $tmp)"
34 t_begin
'keepalive not unreasonably long' && {
38 t_begin
"killing succeeds" && {
42 t_begin
"check stderr" && {
43 t_info
"about to start waiting $nr seconds..."
48 t_begin
'sleep process is NOT running' && {
51 die
"sleep process should've died"