Skip to content

Commit

Permalink
Use flexible threads count in Routine spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalina-Vakulchyk committed Apr 21, 2021
1 parent bb822f1 commit 76670b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/chewy/type/import/routine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

describe '#parallel_options' do
specify { expect(described_class.new(CitiesIndex::City).parallel_options).to be_nil }
specify { expect(described_class.new(CitiesIndex::City, parallel: true).parallel_options).to eq({in_threads: 6}) }
specify { expect(described_class.new(CitiesIndex::City, parallel: true).parallel_options).to eq({in_threads: [::Parallel.processor_count, ActiveRecord::Base.connection_pool.size].min}) }
specify { expect(described_class.new(CitiesIndex::City, parallel: 3).parallel_options).to eq(in_threads: 3) }
specify do
expect(described_class.new(CitiesIndex::City, parallel: {in_threads: 2}).parallel_options).to eq(in_threads: 2)
Expand Down

0 comments on commit 76670b0

Please sign in to comment.