test/integration/multithreading_test.rb in ntl-orchestra-0.9.1 vs test/integration/multithreading_test.rb in ntl-orchestra-0.9.2
- old
+ new
@@ -18,18 +18,22 @@
@conductor = Orchestra::Conductor.new
@conductor.thread_count = 5
end
def test_multithreading
- list = (1..100).to_a
+ list = (1..1000).to_a
thread_ids = @conductor.perform @operation, :list => list
- assert thread_ids.uniq.size > 2, "performance must be spread across threads"
+ assert_equal(
+ @conductor.thread_count,
+ thread_ids.uniq.size,
+ "performance must be spread across threads",
+ )
end
def test_exception_during_multithreading
- list = (1..100).to_a
+ list = (1..50).to_a
list[23] = :blow_up
assert_raises CustomError do
@conductor.perform @operation, :list => list
end