Class: Megatest::QueueReporter
- Inherits:
-
Object
- Object
- Megatest::QueueReporter
- Defined in:
- lib/megatest/queue_reporter.rb
Constant Summary collapse
- POLL_FREQUENCY =
1
Instance Method Summary collapse
-
#initialize(config, queue, out) ⇒ QueueReporter
constructor
A new instance of QueueReporter.
- #run(reporters) ⇒ Object
- #wait ⇒ Object
- #wall_time ⇒ Object
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 |
#wait ⇒ Object
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_time ⇒ Object
15 16 17 |
# File 'lib/megatest/queue_reporter.rb', line 15 def wall_time nil end |