Sha256: 71e27511057877618cc56ac3c4cecde478202a2c97ccd2dbfef54e2a2010c65f

Contents?: true

Size: 660 Bytes

Versions: 50

Compression:

Stored size: 660 Bytes

Contents

#!/bin/sh
. ./test-lib.sh

t_plan 4 "graceful exit test for $model"

t_begin "setup and startup" && {
	rtmpfiles curl_out
	rainbows_setup $model
	rainbows -D sleep.ru -c $unicorn_config
	rainbows_wait_start
}

t_begin "send a request and SIGQUIT while request is processing" && {
	curl -sSfv -T- </dev/null http://$listen/5 > $curl_out 2> $fifo &
	awk -v rainbows_pid=$rainbows_pid '
{ print $0 }
/100 Continue/ {
	print "awk: sending SIGQUIT to", rainbows_pid
	system("kill -QUIT "rainbows_pid)
}' $fifo
	wait
}

dbgcat r_err

t_begin 'response returned "Hello"' && {
	test x$(cat $curl_out) = xHello
}

t_begin 'stderr has no errors' && check_stderr

t_done

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
rainbows-5.2.1 t/t0002-graceful.sh
rainbows-5.2.0 t/t0002-graceful.sh
rainbows-5.1.1 t/t0002-graceful.sh
rainbows-5.1.0 t/t0002-graceful.sh
rainbows-5.0.0.5.ge717 t/t0002-graceful.sh
rainbows-5.0.0 t/t0002-graceful.sh
rainbows-4.7.0 t/t0002-graceful.sh
rainbows-4.6.2 t/t0002-graceful.sh
rainbows-4.6.1 t/t0002-graceful.sh
rainbows-4.6.0.4.g4108 t/t0002-graceful.sh
rainbows-4.6.0 t/t0002-graceful.sh
rainbows-4.5.0 t/t0002-graceful.sh
rainbows-4.4.3 t/t0002-graceful.sh
rainbows-4.4.2 t/t0002-graceful.sh
rainbows-4.4.1.1.gd5c8c t/t0002-graceful.sh
rainbows-4.4.1 t/t0002-graceful.sh
rainbows-4.4.0 t/t0002-graceful.sh
rainbows-4.3.1 t/t0002-graceful.sh
rainbows-4.3.0 t/t0002-graceful.sh
rainbows-4.2.0 t/t0002-graceful.sh