Skip to content

Commit

Permalink
remove MOCK_QUEUE_API_RESPONSE
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturT committed Feb 1, 2024
1 parent c4e2094 commit 348f563
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/knapsack_pro/queue_allocator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ def initialize(args)
end

def test_file_paths(can_initialize_queue, executed_test_files)
if ENV['MOCK_QUEUE_API_RESPONSE'] == 'true'
@@index ||= 0
batches = [
['spec/features/calculator_spec.rb[1:2:1]', 'spec/controllers/articles_controller_spec.rb'],
['spec/collection_spec.rb'],
['spec/features/calculator_spec.rb[1:1:1]'],
['spec/bar_spec.rb'],
[], # the last Queue API response is always the empty list of test files
]
#batches = [
#[]
#]
tests = batches[@@index] || []
@@index += 1
puts '='*50
puts 'Tests (mocked API response):'
puts tests.inspect
puts '='*50
return tests
end

return [] if @fallback_activated
action = build_action(can_initialize_queue, attempt_connect_to_queue: can_initialize_queue)
connection = KnapsackPro::Client::Connection.new(action)
Expand Down

0 comments on commit 348f563

Please sign in to comment.