diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-23 15:48:26 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-23 15:48:26 +0300 |
commit | 3eba43b62dc825dd8a40f74fe027bb613b8ed2a8 (patch) | |
tree | 95a1eae0e6ce9bfd22f49ec3d7db27c582e8bce7 /spec/migrations | |
parent | d546f7d36e6703bda430e2f50fe4e87a07ab48f8 (diff) |
Adjust a range and a size in stages statuses migration
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/migrate_stages_statuses_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb index 4102d57e368..094c9bc604e 100644 --- a/spec/migrations/migrate_stages_statuses_spec.rb +++ b/spec/migrations/migrate_stages_statuses_spec.rb @@ -12,7 +12,7 @@ describe MigrateStagesStatuses, :migration do before do stub_const("#{described_class.name}::BATCH_SIZE", 2) - stub_const("#{described_class.name}::RANGE_SIZE", 2) + stub_const("#{described_class.name}::RANGE_SIZE", 1) projects.create!(id: 1, name: 'gitlab1', path: 'gitlab1') projects.create!(id: 2, name: 'gitlab2', path: 'gitlab2') @@ -50,9 +50,10 @@ describe MigrateStagesStatuses, :migration do Timecop.freeze do migrate! - expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 1, 2) + expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 1, 1) + expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 2, 2) expect(described_class::MIGRATION).to be_scheduled_migration(10.minutes, 3, 3) - expect(BackgroundMigrationWorker.jobs.size).to eq 2 + expect(BackgroundMigrationWorker.jobs.size).to eq 3 end end end |