diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 21:07:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 21:07:42 +0300 |
commit | 7b52c7cb634ef7047d30b0337fe477bcdcedf41d (patch) | |
tree | 374ca9e908204488422046f10e340d1500780362 /spec/lib/gitlab/sidekiq_config | |
parent | b375c6c05fbd03aea33a9ee9f82e678bdaa8c3cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/sidekiq_config')
-rw-r--r-- | spec/lib/gitlab/sidekiq_config/cli_methods_spec.rb | 24 | ||||
-rw-r--r-- | spec/lib/gitlab/sidekiq_config/worker_spec.rb | 8 |
2 files changed, 16 insertions, 16 deletions
diff --git a/spec/lib/gitlab/sidekiq_config/cli_methods_spec.rb b/spec/lib/gitlab/sidekiq_config/cli_methods_spec.rb index 4ba5726732c..8b93ef86eba 100644 --- a/spec/lib/gitlab/sidekiq_config/cli_methods_spec.rb +++ b/spec/lib/gitlab/sidekiq_config/cli_methods_spec.rb @@ -124,28 +124,28 @@ describe Gitlab::SidekiqConfig::CliMethods do name: 'a', feature_category: :category_a, has_external_dependencies: false, - latency_sensitive: false, + urgency: :default, resource_boundary: :cpu }, { name: 'a:2', feature_category: :category_a, has_external_dependencies: false, - latency_sensitive: true, + urgency: :high, resource_boundary: :none }, { name: 'b', feature_category: :category_b, has_external_dependencies: true, - latency_sensitive: true, + urgency: :high, resource_boundary: :memory }, { name: 'c', feature_category: :category_c, has_external_dependencies: false, - latency_sensitive: false, + urgency: :none, resource_boundary: :memory } ] @@ -166,12 +166,12 @@ describe Gitlab::SidekiqConfig::CliMethods do 'has_external_dependencies=true|has_external_dependencies=false' | %w(a a:2 b c) 'has_external_dependencies!=true' | %w(a a:2 c) - # latency_sensitive - 'latency_sensitive=true' | %w(a:2 b) - 'latency_sensitive=false' | %w(a c) - 'latency_sensitive=true,false' | %w(a a:2 b c) - 'latency_sensitive=true|latency_sensitive=false' | %w(a a:2 b c) - 'latency_sensitive!=true' | %w(a c) + # urgency + 'urgency=high' | %w(a:2 b) + 'urgency=default' | %w(a) + 'urgency=high,default,none' | %w(a a:2 b c) + 'urgency=default|urgency=none' | %w(a c) + 'urgency!=high' | %w(a c) # name 'name=a' | %w(a) @@ -186,8 +186,8 @@ describe Gitlab::SidekiqConfig::CliMethods do 'resource_boundary!=memory,cpu' | %w(a:2) # combinations - 'feature_category=category_a&latency_sensitive=true' | %w(a:2) - 'feature_category=category_a&latency_sensitive=true|feature_category=category_c' | %w(a:2 c) + 'feature_category=category_a&urgency=high' | %w(a:2) + 'feature_category=category_a&urgency=high|feature_category=category_c' | %w(a:2 c) end with_them do diff --git a/spec/lib/gitlab/sidekiq_config/worker_spec.rb b/spec/lib/gitlab/sidekiq_config/worker_spec.rb index fcdce8f9432..71fafbf0656 100644 --- a/spec/lib/gitlab/sidekiq_config/worker_spec.rb +++ b/spec/lib/gitlab/sidekiq_config/worker_spec.rb @@ -11,7 +11,7 @@ describe Gitlab::SidekiqConfig::Worker do get_feature_category: attributes[:feature_category], get_weight: attributes[:weight], get_worker_resource_boundary: attributes[:resource_boundary], - latency_sensitive_worker?: attributes[:latency_sensitive], + get_urgency: attributes[:urgency], worker_has_external_dependencies?: attributes[:has_external_dependencies], idempotent?: attributes[:idempotent] ) @@ -47,7 +47,7 @@ describe Gitlab::SidekiqConfig::Worker do describe 'delegations' do [ :feature_category_not_owned?, :get_feature_category, :get_weight, - :get_worker_resource_boundary, :latency_sensitive_worker?, :queue, + :get_worker_resource_boundary, :get_urgency, :queue, :queue_namespace, :worker_has_external_dependencies? ].each do |meth| it "delegates #{meth} to the worker class" do @@ -88,7 +88,7 @@ describe Gitlab::SidekiqConfig::Worker do attributes_a = { feature_category: :source_code_management, has_external_dependencies: false, - latency_sensitive: false, + urgency: :default, resource_boundary: :memory, weight: 2, idempotent: true @@ -97,7 +97,7 @@ describe Gitlab::SidekiqConfig::Worker do attributes_b = { feature_category: :not_owned, has_external_dependencies: true, - latency_sensitive: true, + urgency: :high, resource_boundary: :unknown, weight: 3, idempotent: false |