summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-08 16:10:14 +0000
committerDouwe Maan <douwe@gitlab.com>2015-10-08 16:10:14 +0000
commit6db238dee9379bc588b20dc49274dd48945142c8 (patch)
tree135d2e528cfa23708153e5559ad00ff3f97d2535 /db
parent1115caf8e3a6632f9135c4ee965f0adde6098a78 (diff)
parent9ccd8e2617e9d6e8b5f2ef02e46b5ac8457807aa (diff)
downloadgitlab-ce-6db238dee9379bc588b20dc49274dd48945142c8.tar.gz
Merge branch 'workaround-seed-fu-issue' into 'master'
Fixes GDK issue where repos would not be imported properly Seed-Fu runs this entire fixture in a transaction, so the `after_commit` hook won't run until after the fixture is loaded. That is too late since the Sidekiq::Testing block has already exited. Force clearing the `after_commit` queue to ensure the job is run now. See: gitlab-org/gitlab-development-kit#58 See merge request !1513
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/04_project.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 8f71198e47f..b4639999967 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -73,8 +73,13 @@ Sidekiq::Testing.inline! do
}
project = Projects::CreateService.new(User.first, params).execute
+ # Seed-Fu runs this entire fixture in a transaction, so the `after_commit`
+ # hook won't run until after the fixture is loaded. That is too late
+ # since the Sidekiq::Testing block has already exited. Force clearing
+ # the `after_commit` queue to ensure the job is run now.
+ project.send(:_run_after_commit_queue)
- if project.valid?
+ if project.valid? && project.valid_repo?
print '.'
else
puts project.errors.full_messages