diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 03:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 03:08:48 +0300 |
commit | b69f406585ff64b1c5140ebba775cc754fabb358 (patch) | |
tree | 9af7dfeb0c3f0f8db189a6e18c6be398a7729e2d /spec/lib/gitlab/sidekiq_logging | |
parent | 866ca4e49ff74ffadf8e6f6ff663a168489c2aba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/sidekiq_logging')
-rw-r--r-- | spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb b/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb index 43cdb998091..ac4cf1734a5 100644 --- a/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb +++ b/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb @@ -99,13 +99,8 @@ describe Gitlab::SidekiqLogging::StructuredLogger do context 'when the job args are bigger than the maximum allowed' do it 'keeps args from the front until they exceed the limit' do Timecop.freeze(timestamp) do - job['args'] = [ - 1, - 2, - 'a' * (described_class::MAXIMUM_JOB_ARGUMENTS_LENGTH / 2), - 'b' * (described_class::MAXIMUM_JOB_ARGUMENTS_LENGTH / 2), - 3 - ] + half_limit = Gitlab::Utils::LogLimitedArray::MAXIMUM_ARRAY_LENGTH / 2 + job['args'] = [1, 2, 'a' * half_limit, 'b' * half_limit, 3] expected_args = job['args'].take(3) + ['...'] |