diff options
Diffstat (limited to 't')
-rw-r--r-- | t/simple-http_Revactor.ru | 1 | ||||
-rw-r--r-- | t/simple-http_ThreadPool.ru | 1 | ||||
-rw-r--r-- | t/simple-http_ThreadSpawn.ru | 1 | ||||
-rw-r--r-- | t/sleep.ru | 11 | ||||
-rw-r--r-- | t/t9000.ru | 11 | ||||
-rw-r--r-- | t/worker-follows-master-to-death.ru | 7 |
6 files changed, 3 insertions, 29 deletions
diff --git a/t/simple-http_Revactor.ru b/t/simple-http_Revactor.ru index 9b9c56a..aa37aea 100644 --- a/t/simple-http_Revactor.ru +++ b/t/simple-http_Revactor.ru @@ -1,7 +1,6 @@ use Rack::ContentLength use Rack::ContentType run lambda { |env| - Actor.sleep 1 if env['rack.multithread'] == false && env['rainbows.model'] == :Revactor [ 200, {}, [ Thread.current.inspect << "\n" ] ] else diff --git a/t/simple-http_ThreadPool.ru b/t/simple-http_ThreadPool.ru index 4bb7348..cd5df82 100644 --- a/t/simple-http_ThreadPool.ru +++ b/t/simple-http_ThreadPool.ru @@ -1,7 +1,6 @@ use Rack::ContentLength use Rack::ContentType run lambda { |env| - sleep 1 if env['rack.multithread'] && env['rainbows.model'] == :ThreadPool [ 200, {}, [ Thread.current.inspect << "\n" ] ] else diff --git a/t/simple-http_ThreadSpawn.ru b/t/simple-http_ThreadSpawn.ru index aa1accb..ea5dee2 100644 --- a/t/simple-http_ThreadSpawn.ru +++ b/t/simple-http_ThreadSpawn.ru @@ -1,7 +1,6 @@ use Rack::ContentLength use Rack::ContentType run lambda { |env| - sleep 1 if env['rack.multithread'] && env['rainbows.model'] == :ThreadSpawn [ 200, {}, [ Thread.current.inspect << "\n" ] ] else @@ -7,16 +7,7 @@ run lambda { |env| nr = 1 env["PATH_INFO"] =~ %r{/([\d\.]+)\z} and nr = $1.to_f - (case env['rainbows.model'] - when :FiberPool, :FiberSpawn - Rainbows::Fiber - when :Revactor - Actor - when :RevFiberSpawn - Rainbows::Fiber::Rev - else - Kernel - end).sleep(nr) + Rainbows.sleep(nr) [ 200, {'Content-Type' => 'text/plain'}, [ "Hello\n" ] ] } @@ -3,16 +3,7 @@ use Rack::ContentType use Rainbows::AppPool, :size => ENV['APP_POOL_SIZE'].to_i class Sleeper def call(env) - (case env['rainbows.model'] - when :FiberPool, :FiberSpawn - Rainbows::Fiber - when :Revactor - Actor - when :RevFiberSpawn - Rainbows::Fiber::Rev - else - Kernel - end).sleep(1) + Rainbows.sleep(1) [ 200, {}, [ "#{object_id}\n" ] ] end end diff --git a/t/worker-follows-master-to-death.ru b/t/worker-follows-master-to-death.ru index ed2a519..b372afd 100644 --- a/t/worker-follows-master-to-death.ru +++ b/t/worker-follows-master-to-death.ru @@ -6,12 +6,7 @@ run lambda { |env| case env["PATH_INFO"] when %r{/sleep/(\d+)} - (case env['rainbows.model'] - when :Revactor - Actor - else - Kernel - end).sleep($1.to_i) + Rainbows.sleep($1.to_i) end [ 200, headers, [ "#$$\n" ] ] } |