summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-05 09:59:02 -0700
committerStan Hu <stanhu@gmail.com>2015-10-05 09:59:02 -0700
commit01fe901e47895df923235b66d7e8ce0f2341ee2b (patch)
treec8371756fcf849a314dbbb6ca492b57cf4a09ae4 /db
parent97f7edf37a7c3c17d5038a6cb83d007aa026664c (diff)
downloadgitlab-ce-01fe901e47895df923235b66d7e8ce0f2341ee2b.tar.gz
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
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/04_project.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 8f71198e47f..973b3f278f9 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -73,6 +73,11 @@ 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?
print '.'