Sha256: 72375abd1a01c797776f6e547c2865dc45ff7a5d33da51286df0eda5627cf421
Contents?: true
Size: 921 Bytes
Versions: 12
Compression:
Stored size: 921 Bytes
Contents
#!/bin/sh . ./test-lib.sh skip_models StreamResponseEpoll t_plan 6 "keepalive_timeout 0 tests for $model" t_begin "setup and start" && { rainbows_setup $model 2 0 grep 'keepalive_timeout 0' $unicorn_config rainbows -D env.ru -c $unicorn_config rainbows_wait_start } t_begin 'check server responds with Connection: close' && { curl -sSfi http://$listen/ | grep 'Connection: close' } t_begin "send keepalive response that does not expect close" && { req='GET / HTTP/1.1\r\nHost: example.com\r\n\r\n' t0=$(unix_time) ( cat $fifo > $tmp & printf "$req" wait unix_time > $ok ) | socat - TCP:$listen > $fifo now="$(cat $ok)" elapsed=$(( $now - $t0 )) t_info "elapsed=$elapsed (expecting <=3)" test $elapsed -le 3 } t_begin "'Connection: close' header set" && { grep 'Connection: close' $tmp } t_begin "killing succeeds" && { kill $rainbows_pid } t_begin "check stderr" && { check_stderr } t_done
Version data entries
12 entries across 12 versions & 1 rubygems