lib/testlab/support/parallel.rb in testlab-1.22.1 vs lib/testlab/support/parallel.rb in testlab-1.22.2

- old
+ new

@@ -27,11 +27,11 @@ true end klass_name = klass.to_s.split('::').last command = ZTK::Command.new(:silence => true, :ignore_exit_status => true) - parallel = ZTK::Parallel.new(:ui => self.ui) + parallel = ZTK::Parallel.new(:ui => self.ui, :raise_exceptions => false) parallel.config do |config| config.before_fork = method(:before_fork) end priority_groups = klass.priority_groups @@ -80,9 +80,16 @@ end end reset_screen end + end + + exception_count = parallel.results.count{ |result| (Exception === result) } + if (exception_count > 0) + message = "Encountered #{exception_count} exceptions during parallel operations! (See logs for details)" + self.ui.logger.fatal { message } + raise TestLabError, message end true end