aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/lib/test/unit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index e8ab158f11..78fa490871 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -422,7 +422,7 @@ module Test
@workers_hash = {} # out-IO => worker
@ios = [] # Array of worker IOs
begin
- @options[:parallel].times {launch_worker}
+ [@tasks.size, @options[:parallel]].min.times {launch_worker}
while _io = IO.select(@ios)[0]
break if _io.any? do |io|