Skip to content

Commit

Permalink
Skip flaky test on CI
Browse files Browse the repository at this point in the history
Sleeping did not improve the situation
  • Loading branch information
Earlopain committed Oct 18, 2023
1 parent 3ec6351 commit 13f457c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/logical/job_stats_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

class JobStatsTest < ActiveSupport::TestCase
it "returns enqueued jobs" do
skip "flaky on CI" if ENV["CI"]

url1 = create(:artist_url)
submission1, submission2 = create_list(:artist_submission, 2, artist_url: url1)
file1, file2 = create_list(:submission_file, 2, artist_submission: submission1)
Expand All @@ -20,9 +22,6 @@ class JobStatsTest < ActiveSupport::TestCase
[submission1, submission2, submission3].each { |submission| CreateSubmissionFileJob.perform_later(submission, {}) }
[file1, file2, file3, file4, file5].each { |file| E6IqdbQueryJob.perform_later(file) }

# There seems to be some race condition issue here (CI)
sleep 0.25

stats = JobStats.new

assert_equal({ url1.id => 1, url2.id => 1 }, stats.scraping_queued)
Expand Down

0 comments on commit 13f457c

Please sign in to comment.