diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-05 19:59:02 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-10-05 19:59:02 +0300 |
commit | 01fe901e47895df923235b66d7e8ce0f2341ee2b (patch) | |
tree | c8371756fcf849a314dbbb6ca492b57cf4a09ae4 /db/fixtures | |
parent | 97f7edf37a7c3c17d5038a6cb83d007aa026664c (diff) |
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/fixtures')
-rw-r--r-- | db/fixtures/development/04_project.rb | 5 |
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 '.' |