Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesndrs committed Aug 22, 2023
1 parent d1e6cf5 commit 37c6955
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ingestors/uhasselt_ingestor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def process_uhasselt(url)
end
start_date = Time.zone.parse("#{date_s[1]}/#{date_s[0]} #{start_hours}:00")
end_date = Time.zone.parse("#{date_s[1]}/#{date_s[0]} #{end_hours}:00")
if start_date < Date.today - 2.months
if start_date < Time.zone.now - 2.months
start_date += 1.year
end_date += 1.year
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/ingestors/uhasselt_ingestor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UhasseltIngestorTest < ActiveSupport::TestCase

# run task
assert_difference 'Event.count', 14 do
freeze_time(Time.new('2023-06-18')) do
freeze_time(2023) do
VCR.use_cassette("ingestors/uhasselt") do
ingestor.read(source.url)
ingestor.write(@user, @content_provider)
Expand Down

0 comments on commit 37c6955

Please sign in to comment.