diff options
Diffstat (limited to 'spec/lib/gitlab/database/reindexing_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/reindexing_spec.rb | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/spec/lib/gitlab/database/reindexing_spec.rb b/spec/lib/gitlab/database/reindexing_spec.rb index 495e953f993..4c98185e780 100644 --- a/spec/lib/gitlab/database/reindexing_spec.rb +++ b/spec/lib/gitlab/database/reindexing_spec.rb @@ -46,25 +46,11 @@ RSpec.describe Gitlab::Database::Reindexing do end end - context 'when async index destruction is enabled' do - it 'executes async index destruction prior to any reindexing actions' do - stub_feature_flags(database_async_index_destruction: true) + it 'executes async index destruction prior to any reindexing actions' do + expect(Gitlab::Database::AsyncIndexes).to receive(:drop_pending_indexes!).ordered.exactly(databases_count).times + expect(described_class).to receive(:automatic_reindexing).ordered.exactly(databases_count).times - expect(Gitlab::Database::AsyncIndexes).to receive(:drop_pending_indexes!).ordered.exactly(databases_count).times - expect(described_class).to receive(:automatic_reindexing).ordered.exactly(databases_count).times - - described_class.invoke - end - end - - context 'when async index destruction is disabled' do - it 'does not execute async index destruction' do - stub_feature_flags(database_async_index_destruction: false) - - expect(Gitlab::Database::AsyncIndexes).not_to receive(:drop_pending_indexes!) - - described_class.invoke - end + described_class.invoke end context 'calls automatic reindexing' do |