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:
authorYorick Peterse <yorickpeterse@gmail.com>2016-10-07 16:20:57 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-11-07 15:11:44 +0300
commit509910b89f636f95d2d5a9cd3f38ce8f7f4f47a6 (patch)
treeb9f9c147a983aa6505d0d6a9a7e4a37f26a19161 /spec/models/issue_collection_spec.rb
parentf694f94c491452a50035c2ff43c8ba595c0e73aa (diff)
Process commits in a separate worker
This moves the code used for processing commits from GitPushService to its own Sidekiq worker: ProcessCommitWorker. Using a Sidekiq worker allows us to process multiple commits in parallel. This in turn will lead to issues being closed faster and cross references being created faster. Furthermore by isolating this code into a separate class it's easier to test and maintain the code. The new worker also ensures it can efficiently check which issues can be closed, without having to run numerous SQL queries for every issue.
Diffstat (limited to 'spec/models/issue_collection_spec.rb')
-rw-r--r--spec/models/issue_collection_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/issue_collection_spec.rb b/spec/models/issue_collection_spec.rb
index d9ab397c302..d742c814680 100644
--- a/spec/models/issue_collection_spec.rb
+++ b/spec/models/issue_collection_spec.rb
@@ -55,4 +55,13 @@ describe IssueCollection do
end
end
end
+
+ describe '#visible_to' do
+ it 'is an alias for updatable_by_user' do
+ updatable_by_user = described_class.instance_method(:updatable_by_user)
+ visible_to = described_class.instance_method(:visible_to)
+
+ expect(visible_to).to eq(updatable_by_user)
+ end
+ end
end