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
This commit is contained in:
commit
6db238dee9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue