Class: CI::Queue::Grind

Inherits:
Static
  • Object
show all
Defined in:
lib/ci/queue/grind.rb

Constant Summary

Constants inherited from Static

Static::TEN_MINUTES

Constants included from Common

Common::CONNECTION_ERRORS

Instance Attribute Summary

Attributes inherited from Static

#progress, #total

Attributes included from Common

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Static

#acknowledge, #boot_heartbeat_process!, #build, #created_at=, #distributed?, #ensure_heartbeat_thread_alive!, #exhausted?, #expired?, #increment_test_failed, #max_test_failed?, #poll, #populate, #populated?, #remaining, #report_worker_error, #requeue, #retry_queue, #running, #shutdown!, #size, #stop_heartbeat!, #supervisor, #test_failed, #to_a, #with_heartbeat

Methods included from Common

#distributed?, #flaky?, #release!, #report_failure!, #report_success!, #rescue_connection_errors, #retrying?

Constructor Details

#initialize(path, config) ⇒ Grind

Returns a new instance of Grind.



13
14
15
16
17
18
19
20
# File 'lib/ci/queue/grind.rb', line 13

def initialize(path, config)
  io = path == '-' ? STDIN : ::File.open(path)

  tests_to_run = io.each_line.map(&:strip).reject(&:empty?)
  test_grinds = (tests_to_run * config.grind_count).sort

  super(test_grinds, config)
end

Class Method Details

.from_uri(uri, config) ⇒ Object



8
9
10
# File 'lib/ci/queue/grind.rb', line 8

def from_uri(uri, config)
  new(uri.path, config)
end