test for multiple local workers

This commit is contained in:
Nick Gauthier 2010-01-29 15:27:48 -05:00
parent 969aedc2cc
commit 7a39fe8855
1 changed files with 12 additions and 0 deletions

View File

@ -43,7 +43,19 @@ class MasterTest < Test::Unit::TestCase
] ]
) )
finish = Time.now finish = Time.now
assert (finish-start) < 15, "took #{finish-start} seconds"
end
should "run a slow test 10 times on 2 workers with 5 runners each quickly" do
start = Time.now
Hydra::Master.new(
:files => [File.join(File.dirname(__FILE__), 'fixtures', 'slow.rb')]*10,
:workers => [
{ :type => :local, :runners => 5 },
{ :type => :local, :runners => 5 }
]
)
finish = Time.now
assert (finish-start) < 15, "took #{finish-start} seconds" assert (finish-start) < 15, "took #{finish-start} seconds"
end end
end end