diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-09 06:51:40 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-09 06:51:40 +0300 |
commit | 7ccbb562b161881cffea77b228c2c3d062fcc864 (patch) | |
tree | b950723974189aa2b66327fe65505873671e93e8 /spec | |
parent | 44aa23b9ab7341836e00968ea82b6725f3318a21 (diff) |
Fix Sidekiq scheduling_latency_s
This number was reporting a negative number because `current_time` was
a monotonic counter, not an absolute time.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65748
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb b/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb index 98286eb432d..bf26335ef7f 100644 --- a/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb +++ b/spec/lib/gitlab/sidekiq_logging/structured_logger_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe Gitlab::SidekiqLogging::StructuredLogger do describe '#call' do let(:timestamp) { Time.iso8601('2018-01-01T12:00:00Z') } - let(:created_at) { timestamp } - let(:scheduling_latency_s) { 0.0 } + let(:created_at) { timestamp - 1.second } + let(:scheduling_latency_s) { 1.0 } let(:job) do { |