Skip to content

Commit

Permalink
Add failing test for scheduling in bulk and enqueued_at (#5162)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamniedzielski committed Feb 1, 2022
1 parent 38f4a93 commit 7e54709
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_scheduling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ def to_f; 42.0 end
assert job['created_at']
refute job['enqueued_at']
end

it 'removes the enqueued_at field when scheduling in bulk' do
ss = Sidekiq::ScheduledSet.new
ss.clear

assert Sidekiq::Client.push_bulk('class' => SomeScheduledWorker, 'args' => [['mike'], ['mike']], 'at' => 600)
job = ss.first
assert job['created_at']
refute job['enqueued_at']
end
end

end

0 comments on commit 7e54709

Please sign in to comment.