Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 16:42:19 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 16:42:19 +0300
commit7082530d555ad98fede2823d2123622abaf1c3a3 (patch)
tree9e221fa2fe91746d9daa37a85d6d10ee10d8b22a /spec/migrations
parent6120dc261ab3700b7a19f683559494319b6a1b75 (diff)
Schedule stages statuses bg migrations in batches
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/migrate_stages_statuses_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb
index 8463583cef3..1769b1e256b 100644
--- a/spec/migrations/migrate_stages_statuses_spec.rb
+++ b/spec/migrations/migrate_stages_statuses_spec.rb
@@ -12,6 +12,7 @@ describe MigrateStagesStatuses, :migration do
before do
stub_const("#{described_class.name}::BATCH_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')
@@ -49,9 +50,10 @@ describe MigrateStagesStatuses, :migration do
Timecop.freeze do
migrate!
- expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 1)
- expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 2)
- expect(described_class::MIGRATION).to be_scheduled_migration(10.minutes, 3)
+ puts BackgroundMigrationWorker.jobs.inspect
+ 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 3
end
end