Sha256: 0a2a5e4772f53652aff42e34ecbcbad3f76e6b7ed4d50d05ea57801e0ea9753a

Contents?: true

Size: 989 Bytes

Versions: 27

Compression:

Stored size: 989 Bytes

Contents

#!/bin/sh
. ./test-lib.sh
case $model in
EventMachine) ;;
*)
	t_info "skipping $T since it's not compatible with $model"
	exit 0
	;;
esac

require_check rack/fiber_pool Rack::FiberPool

t_plan 7 "basic test with rack-fiber_pool gem"

CONFIG_RU=rack-fiber_pool/app.ru

t_begin "setup and start" && {
	rainbows_setup
	rtmpfiles curl_err curl_out

	rainbows -D -c $unicorn_config $CONFIG_RU
	rainbows_wait_start
}

t_begin "send requests off in parallel" && {
	curl --no-buffer -sSf http://$listen/ >> $curl_out 2>> $curl_err &
	curl --no-buffer -sSf http://$listen/ >> $curl_out 2>> $curl_err &
	curl --no-buffer -sSf http://$listen/ >> $curl_out 2>> $curl_err &
}

t_begin "wait for curl terminations" && {
	wait
}

t_begin "termination signal sent" && {
	kill $rainbows_pid
}

t_begin "no errors from curl" && {
	test ! -s $curl_err
}

t_begin "no errors in stderr" && check_stderr

t_begin "ensure we hit 3 separate fibers" && {
	test x3 = x"$(sort < $curl_out | uniq | wc -l)"
}

t_done

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rainbows-4.4.3 t/t0600-rack-fiber_pool.sh
rainbows-4.4.2 t/t0600-rack-fiber_pool.sh
rainbows-4.4.1.1.gd5c8c t/t0600-rack-fiber_pool.sh
rainbows-4.4.1 t/t0600-rack-fiber_pool.sh
rainbows-4.4.0 t/t0600-rack-fiber_pool.sh
rainbows-4.3.1 t/t0600-rack-fiber_pool.sh
rainbows-4.3.0 t/t0600-rack-fiber_pool.sh
rainbows-4.2.0 t/t0600-rack-fiber_pool.sh
rainbows-4.1.0 t/t0600-rack-fiber_pool.sh
rainbows-4.0.0 t/t0600-rack-fiber_pool.sh
rainbows-3.4.0 t/t0600-rack-fiber_pool.sh
rainbows-3.3.0 t/t0600-rack-fiber_pool.sh
rainbows-3.2.0 t/t0600-rack-fiber_pool.sh
rainbows-3.1.0 t/t0600-rack-fiber_pool.sh
rainbows-3.0.0 t/t0600-rack-fiber_pool.sh
rainbows-2.1.0 t/t0600-rack-fiber_pool.sh
rainbows-2.0.1 t/t0600-rack-fiber_pool.sh
rainbows-2.0.0 t/t0600-rack-fiber_pool.sh
rainbows-1.0.0 t/t0600-rack-fiber_pool.sh
rainbows-1.0.0pre1 t/t0600-rack-fiber_pool.sh