Class: Specwrk::Web::Endpoints::CompleteAndPop

Inherits:
Popable
  • Object
show all
Defined in:
lib/specwrk/web/endpoints/complete_and_pop.rb

Constant Summary collapse

EXAMPLE_STATUSES =
%w[passed failed pending]
SYNTHETIC_FAILURE_CLASS =
"Specwrk::WorkerExecutionError"

Constants inherited from Base

Base::MUTEX

Instance Attribute Summary

Attributes inherited from Base

#started_at

Instance Method Summary collapse

Methods inherited from Base

#initialize, #response

Constructor Details

This class inherits a constructor from Specwrk::Web::Endpoints::Base

Instance Method Details

#with_responseObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/specwrk/web/endpoints/complete_and_pop.rb', line 12

def with_response
  retry_examples # pre-calculate before lock
  omitted_processing_examples # pre-calculate before lock

  with_lock do
    processing.delete(*(completed_examples.keys + retry_examples.keys).map(&:to_s))
    pending.merge!(retry_examples)
  end

  completed.merge!(completed_examples)
  failure_counts.merge!(retry_examples_new_failure_counts)

  update_run_times

  with_pop_response
end