Flaky spec around UTC midnight rspec ./spec/support_specs/time_travel_spec.rb:15 # time travel :time_travel time-travels by the given duration
Job #1766773841 failed for 51ca7ae6:
Knapsack global time execution for tests: 31m 23s
Failures:
1) time travel :time_travel time-travels by the given duration
Failure/Error: expect(Date.current).to eq(today + 3.days)
expected: Fri, 12 Nov 2021
got: Sat, 13 Nov 2021
(compared using ==)
Diff:
@@ -1 +1 @@
-Fri, 12 Nov 2021
+Sat, 13 Nov 2021
# ./spec/support_specs/time_travel_spec.rb:16:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:406:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:397:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:393:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:31:in `with_raw_context'
# ./spec/spec_helper.rb:393:in `block (2 levels) in <top (required)>'
# ./spec/support/time_travel.rb:17:in `block (3 levels) in <top (required)>'
# ./spec/support/time_travel.rb:17:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:102:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:56:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:102:in `block (2 levels) in <top (required)>'
2) time travel :time_travel works with negative durations
Failure/Error: expect(Date.current).to eq(today - 5.days)
expected: Thu, 04 Nov 2021
got: Fri, 05 Nov 2021
(compared using ==)
Diff:
@@ -1 +1 @@
-Thu, 04 Nov 2021
+Fri, 05 Nov 2021
# ./spec/support_specs/time_travel_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:406:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:397:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:393:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:31:in `with_raw_context'
# ./spec/spec_helper.rb:393:in `block (2 levels) in <top (required)>'
# ./spec/support/time_travel.rb:17:in `block (3 levels) in <top (required)>'
# ./spec/support/time_travel.rb:17:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:102:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:56:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:102:in `block (2 levels) in <top (required)>'
Finished in 31 minutes 26 seconds (files took 1 minute 4.5 seconds to load)
3290 examples, 2 failures
Failed examples:
rspec ./spec/support_specs/time_travel_spec.rb:15 # time travel :time_travel time-travels by the given duration
rspec ./spec/support_specs/time_travel_spec.rb:19 # time travel :time_travel works with negative durations