summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-07 09:41:35 -0700
committerStan Hu <stanhu@gmail.com>2018-07-07 09:41:35 -0700
commit376137ca273df01009a3919eb081fbbe6ba4a4d3 (patch)
tree259125d75001414ff9ff935668d501e50004b2fc
parente0c0ce28ea786a23d15eee95d56560079b0c6dfe (diff)
downloadgitlab-ce-sh-fix-issue-48836.tar.gz
Disable Sidekiq when importing a GitLab project from a filesh-fix-issue-48836
The actual import can take over 40 seconds to run, which can cause request timeouts. This should be done inside gitlab-qa, where Sidekiq is actually running. Closes #48836
-rw-r--r--spec/features/projects/import_export/import_file_spec.rb28
1 files changed, 13 insertions, 15 deletions
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb
index 9cbfb62d872..97d3172d5a2 100644
--- a/spec/features/projects/import_export/import_file_spec.rb
+++ b/spec/features/projects/import_export/import_file_spec.rb
@@ -35,18 +35,14 @@ describe 'Import/Export - project import integration test', :js do
expect(Gitlab::ImportExport).to receive(:import_upload_path).with(filename: /\A\h{32}\z/).and_call_original
attach_file('file', file)
- click_on 'Import project'
-
- expect(Project.count).to eq(1)
-
- project = Project.last
- expect(project).not_to be_nil
- expect(project.description).to eq("Foo Bar")
- expect(project.issues).not_to be_empty
- expect(project.merge_requests).not_to be_empty
- expect(project_hook_exists?(project)).to be true
- expect(wiki_exists?(project)).to be true
- expect(project.import_state.status).to eq('finished')
+
+ # Disable the actual import because this can take over 40 seconds to
+ # run. This should be done inside gitlab-qa.
+ Sidekiq::Testing.fake! do
+ click_on 'Import project'
+ end
+
+ expect(page).to have_content("Project '#{project_path}' is being imported")
end
end
@@ -59,10 +55,12 @@ describe 'Import/Export - project import integration test', :js do
fill_in :path, with: 'test-project-path', visible: true
attach_file('file', file)
- expect { click_on 'Import project' }.to change { Project.count }.by(1)
+ # Disable the actual import because this can take over 40 seconds to
+ # run. This should be done inside gitlab-qa.
+ Sidekiq::Testing.fake! do
+ click_on 'Import project'
+ end
- project = Project.last
- expect(project).not_to be_nil
expect(page).to have_content("Project 'test-project-path' is being imported")
end
end