Class: CI::Queue::Grind
Constant Summary
Constants inherited from Static
Constants included from Common
Instance Attribute Summary
Attributes inherited from Static
Attributes included from Common
Class Method Summary collapse
Instance Method Summary collapse
-
#entry_resolver ⇒ Object
Grind always eagerly loads test files and populates @index via Static#populate, so poll uses the @index path.
- #entry_resolver=(_) ⇒ Object
-
#initialize(path, config) ⇒ Grind
constructor
A new instance of Grind.
Methods inherited from Static
#acknowledge, #boot_heartbeat_process!, #build, #created_at=, #distributed?, #ensure_heartbeat_thread_alive!, #exhausted?, #expired?, #increment_test_failed, #lease_for, #max_test_failed?, #poll, #populate, #populated?, #queue_initialized?, #remaining, #report_worker_error, #requeue, #retry_queue, #running, #shutdown!, #size, #stop_heartbeat!, #stream_populate, #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.
19 20 21 22 23 24 25 26 |
# File 'lib/ci/queue/grind.rb', line 19 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 |
Instance Method Details
#entry_resolver ⇒ Object
Grind always eagerly loads test files and populates @index via Static#populate, so poll uses the @index path. Bypass entry_resolver to avoid JSON-formatting overhead on potentially millions of entries.
16 |
# File 'lib/ci/queue/grind.rb', line 16 def entry_resolver; nil; end |
#entry_resolver=(_) ⇒ Object
17 |
# File 'lib/ci/queue/grind.rb', line 17 def entry_resolver=(_); end |