Class: TestQueue::Runner::Example
Constant Summary
MiniTest, TOKEN_REGEX
Instance Attribute Summary
#concurrency, #exit_when_done, #stats
Instance Method Summary
collapse
#abort, #after_fork_internal, #around_filter, #awaiting_suites?, #cleanup_worker, #collect_worker_data, #connect_to_relay, #discover_suites, #distribute_queue, #enqueue_discovered_suite, #execute, #execute_internal, #kill_subprocesses, #kill_suite_discovery_process, #kill_workers, #prepare, #queue_status, #reap_suite_discovery_process, #reap_workers, #relay?, #relay_to_master, #start_master, #start_relay, #stats_file, #stop_master, #summarize, #summarize_internal, #worker_completed
Constructor Details
#initialize(args) ⇒ Example
Returns a new instance of Example.
9
10
11
|
# File 'lib/test_queue/runner/example.rb', line 9
def initialize(args)
super(TestFramework::Example.new(args))
end
|
Instance Method Details
#after_fork(num) ⇒ Object
18
19
20
21
|
# File 'lib/test_queue/runner/example.rb', line 18
def after_fork(num)
puts " -- worker #{num} booted as pid #{$$}"
super
end
|
#run_worker(iterator) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/test_queue/runner/example.rb', line 23
def run_worker(iterator)
iterator.inject(0) do |sum, item|
puts " #{item.inspect}"
sum + item.to_i
end
end
|
#spawn_workers ⇒ Object
13
14
15
16
|
# File 'lib/test_queue/runner/example.rb', line 13
def spawn_workers
puts "Spawning #{@concurrency} workers"
super
end
|
#summarize_worker(worker) ⇒ Object
30
31
32
33
|
# File 'lib/test_queue/runner/example.rb', line 30
def summarize_worker(worker)
worker.summary = worker.output.scan(/^\s*(\d+)/).join(', ')
worker.failure_output = ''
end
|