summaryrefslogtreecommitdiff
path: root/spec/models/ci/runner_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-22 13:08:46 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-22 13:51:53 +0200
commita5f6182753502a5e74b06836c9bb70d287bf6fe6 (patch)
treec3e87a2fa75eae8c87e81f1358df600b84ceca9c /spec/models/ci/runner_spec.rb
parent9174d60ba1ce3e183396f360c6e41ed23540b6d0 (diff)
downloadgitlab-ce-a5f6182753502a5e74b06836c9bb70d287bf6fe6.tar.gz
Optimise build queue serviceoptimise-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/ci/runner_spec.rb')
-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