Class: Megatest::QueueReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/megatest/queue_reporter.rb

Constant Summary collapse

POLL_FREQUENCY =
1

Instance Method Summary collapse

Constructor Details

#initialize(config, queue, out) ⇒ QueueReporter

Returns a new instance of QueueReporter.



9
10
11
12
13
# File 'lib/megatest/queue_reporter.rb', line 9

def initialize(config, queue, out)
  @config = config
  @queue = queue
  @out = out
end

Instance Method Details

#run(reporters) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/megatest/queue_reporter.rb', line 24

def run(reporters)
  summary = @queue.global_summary
  summary.deduplicate!
  reporters.each { |r| r.summary(self, @queue, summary) }

  @queue.populated? && @queue.empty? && summary.success?
end

#waitObject



19
20
21
22
# File 'lib/megatest/queue_reporter.rb', line 19

def wait
  wait_for("Waiting for workers to start") { @queue.populated? }
  wait_for("Waiting for tests to be ran") { @queue.empty? }
end

#wall_timeObject



15
16
17
# File 'lib/megatest/queue_reporter.rb', line 15

def wall_time
  nil
end