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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 03:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 03:08:48 +0300
commitb69f406585ff64b1c5140ebba775cc754fabb358 (patch)
tree9af7dfeb0c3f0f8db189a6e18c6be398a7729e2d /spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb
parent866ca4e49ff74ffadf8e6f6ff663a168489c2aba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb')
-rw-r--r--spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb9
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) + ['...']