Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2014-03-19 05:32:40 +0400
committerRobert Speicher <rspeicher@gmail.com>2014-03-19 11:57:37 +0400
commit53d3294d1de6a3ded84532c1874ca48910fd69b0 (patch)
tree3c8a74cd48b4260e6bb0627fec76db40b01cc6ef /spec/factories.rb
parent046773d6e53035599544de4f85906bf706eab7d1 (diff)
Speed up features/notes_on_merge_requests_spec
This spec featured the slowest tests in the entire suite. After some debugging, the cause was found to be the large commit diff generated by comparing the stable and master branches. To fix this, the seed repository was modified to create a simple branch off of master that consists of three simple commits and minor changes. The spec was then updated to compare master to this branch instead of stable. The result is a spec group that runs in under 30 seconds, down from about 90.
Diffstat (limited to 'spec/factories.rb')
-rw-r--r--spec/factories.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 7fc2b7c5e97..373c2a5acff 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -146,6 +146,11 @@ FactoryGirl.define do
state :reopened
end
+ trait :simple do
+ source_branch "simple_merge_request"
+ target_branch "master"
+ end
+
factory :closed_merge_request, traits: [:closed]
factory :reopened_merge_request, traits: [:reopened]
factory :merge_request_with_diffs, traits: [:with_diffs]
@@ -161,7 +166,6 @@ FactoryGirl.define do
factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note]
factory :note_on_merge_request, traits: [:on_merge_request]
factory :note_on_merge_request_diff, traits: [:on_merge_request, :on_diff]
- factory :note_on_merge_request_with_attachment, traits: [:on_merge_request, :with_attachment]
trait :on_commit do
project factory: :project