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:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-22 14:08:46 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-22 14:51:53 +0300
commita5f6182753502a5e74b06836c9bb70d287bf6fe6 (patch)
treec3e87a2fa75eae8c87e81f1358df600b84ceca9c /spec/models
parent9174d60ba1ce3e183396f360c6e41ed23540b6d0 (diff)
Optimise build queue service
This makes BuildQueueService to force refresh runners that are considered to have recent queue. Such runners are the ones that connected within online interval + time to expire runner cache.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/runner_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb
index 78b151631c1..70ff3cf5dc4 100644
--- a/spec/models/ci/runner_spec.rb
+++ b/spec/models/ci/runner_spec.rb
@@ -80,6 +80,13 @@ describe Ci::Runner do
end
end
+ describe 'constraints' do
+ it '.UPDATE_CONTACT_COLUMN_EVERY' do
+ expect(described_class::UPDATE_CONTACT_COLUMN_EVERY.max)
+ .to be <= described_class::ONLINE_CONTACT_TIMEOUT
+ end
+ end
+
describe '#access_level' do
context 'when creating new runner and access_level is nil' do
let(:runner) do