summaryrefslogtreecommitdiff
path: root/spec/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/migrate_stage_id_reference_in_background_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/migrations/migrate_stage_id_reference_in_background_spec.rb b/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
index 90ad5c39089..e829a9238f6 100644
--- a/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
+++ b/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
@@ -21,7 +21,8 @@ describe MigrateStageIdReferenceInBackground, :migration, :sidekiq do
let(:projects) { table(:projects) }
before do
- stub_const("#{described_class.name}::BATCH_SIZE", 2)
+ stub_const("#{described_class.name}::BATCH_SIZE", 3)
+ stub_const("#{described_class.name}::RANGE_SIZE", 2)
projects.create!(id: 123, name: 'gitlab1', path: 'gitlab1')
projects.create!(id: 345, name: 'gitlab2', path: 'gitlab2')
@@ -48,9 +49,10 @@ describe MigrateStageIdReferenceInBackground, :migration, :sidekiq do
migrate!
expect(described_class::MIGRATION).to be_scheduled_migration(2.minutes, 1, 2)
- expect(described_class::MIGRATION).to be_scheduled_migration(4.minutes, 3, 4)
- expect(described_class::MIGRATION).to be_scheduled_migration(6.minutes, 5, 6)
- expect(BackgroundMigrationWorker.jobs.size).to eq 3
+ expect(described_class::MIGRATION).to be_scheduled_migration(2.minutes, 3, 3)
+ expect(described_class::MIGRATION).to be_scheduled_migration(4.minutes, 4, 5)
+ expect(described_class::MIGRATION).to be_scheduled_migration(4.minutes, 6, 6)
+ expect(BackgroundMigrationWorker.jobs.size).to eq 4
end
end
end