add test for default timeout
This commit is contained in:
parent
6f888f025e
commit
3f76a646c1
1 changed files with 12 additions and 0 deletions
|
@ -37,4 +37,16 @@ test "Creates are normal priority", %{post: post} do
|
|||
assert {:ok, %Oban.Job{priority: 0}} = Federator.publish(post)
|
||||
end
|
||||
end
|
||||
|
||||
describe "Oban job timeout" do
|
||||
test "should have a timeout" do
|
||||
clear_config([:workers, :timeout, :federator_outgoing], :timer.minutes(2))
|
||||
assert Pleroma.Workers.PublisherWorker.timeout(nil) == :timer.minutes(2)
|
||||
end
|
||||
|
||||
test "should use a default timeout if none specified" do
|
||||
clear_config([:workers, :timeout, :federator_outgoing])
|
||||
assert Pleroma.Workers.PublisherWorker.timeout(nil) == :timer.seconds(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue