about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-26 22:20:57 +0000
committerEric Wong <normalperson@yhbt.net>2010-05-26 22:34:42 +0000
commit58661617ab802010ecbc45ce3afbca1d63cb9189 (patch)
tree6015af3842630d5b50278689630497810103e816 /t
parentc6ecda097af9cc559b2d38b01ae23daf733b3786 (diff)
downloadrainbows-58661617ab802010ecbc45ce3afbca1d63cb9189.tar.gz
Diffstat (limited to 't')
-rw-r--r--t/GNUmakefile1
-rw-r--r--t/simple-http_WriterThreadSpawn.ru9
-rwxr-xr-xt/t0200-async-response.sh2
3 files changed, 11 insertions, 1 deletions
diff --git a/t/GNUmakefile b/t/GNUmakefile
index 6540aa0..66c4681 100644
--- a/t/GNUmakefile
+++ b/t/GNUmakefile
@@ -23,6 +23,7 @@ endif
 export RUBYLIB RUBY_VERSION
 
 models += WriterThreadPool
+models += WriterThreadSpawn
 models += ThreadPool
 models += ThreadSpawn
 models += Rev
diff --git a/t/simple-http_WriterThreadSpawn.ru b/t/simple-http_WriterThreadSpawn.ru
new file mode 100644
index 0000000..69136f0
--- /dev/null
+++ b/t/simple-http_WriterThreadSpawn.ru
@@ -0,0 +1,9 @@
+use Rack::ContentLength
+use Rack::ContentType
+run lambda { |env|
+  if env['rack.multithread'] && env['rainbows.model'] == :WriterThreadSpawn
+    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
+  else
+    raise "rack.multithread is false"
+  end
+}
diff --git a/t/t0200-async-response.sh b/t/t0200-async-response.sh
index a1c5928..16e1f76 100755
--- a/t/t0200-async-response.sh
+++ b/t/t0200-async-response.sh
@@ -2,7 +2,7 @@
 CONFIG_RU=${CONFIG_RU-'async-response.ru'}
 . ./test-lib.sh
 
-skip_models Base WriterThreadPool
+skip_models Base WriterThreadPool WriterThreadSpawn
 
 case $CONFIG_RU in
 *no-autochunk.ru)