Class: Micron::Runner::ParallelClazz

Inherits:
Clazz
  • Object
show all
Defined in:
lib/micron/runner/parallel_clazz.rb

Overview

Base class for parallel Clazz implementations

Direct Known Subclasses

ForkingClazz, ProcClazz

Instance Attribute Summary

Attributes inherited from Clazz

#methods, #name

Instance Method Summary collapse

Methods inherited from Clazz

#create, #initialize

Methods included from Debug

#debug

Constructor Details

This class inherits a constructor from Micron::Runner::Clazz

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/micron/runner/parallel_clazz.rb', line 12

def run
  # spawn tests in separate processes
  tests = []
  debug "spawning #{methods.size} methods"
  methods.each do |method|
    Micron.runner.report(:start_method, method) # TODO not sure about this
    tests << spawn_test(method)
  end

  # wait for all test methods to return
  @methods = wait_for_tests(tests)

  # collect results
  # @methods = collect_results(finished)
  debug "collected #{@methods.size} methods"
end