From b4f1271320d38e83141dbb38463c3a368661aef7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Nov 2009 20:15:03 -0800 Subject: initial cut of the RevThreadSpawn model Seems to pass all tests, but that may only mean our test cases are lacking... --- t/GNUmakefile | 1 + t/simple-http_RevThreadSpawn.ru | 9 +++++++++ t/t9000-rack-app-pool.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 t/simple-http_RevThreadSpawn.ru (limited to 't') diff --git a/t/GNUmakefile b/t/GNUmakefile index 8c8ed84..da4dfd2 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -19,6 +19,7 @@ endif export RUBYLIB RUBY_VERSION models := ThreadPool ThreadSpawn Rev EventMachine +models += RevThreadSpawn ifeq ($(RUBY_VERSION),1.9.1) # 1.9.2-preview1 was broken models += Revactor endif diff --git a/t/simple-http_RevThreadSpawn.ru b/t/simple-http_RevThreadSpawn.ru new file mode 100644 index 0000000..145b876 --- /dev/null +++ b/t/simple-http_RevThreadSpawn.ru @@ -0,0 +1,9 @@ +use Rack::ContentLength +use Rack::ContentType +run lambda { |env| + if env['rack.multithread'] && env['rainbows.model'] == :RevThreadSpawn + [ 200, {}, [ env.inspect << "\n" ] ] + else + raise "rack.multithread is false" + end +} diff --git a/t/t9000-rack-app-pool.sh b/t/t9000-rack-app-pool.sh index 989b2c1..cd08724 100755 --- a/t/t9000-rack-app-pool.sh +++ b/t/t9000-rack-app-pool.sh @@ -1,7 +1,7 @@ #!/bin/sh . ./test-lib.sh case $model in -Thread*) ;; +*Thread*) ;; *) t_info "skipping $T since it's not compatible with $model" exit 0 -- cgit v1.2.3-24-ge0c7