Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxraven committed Nov 11, 2024
1 parent 4e70da1 commit bef9950
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/delayed_queue_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,17 @@ def assert_resque_key_exists?(key)
end

context "non-batch delayed item queue" do
batch_enabled = Resque::Scheduler.enable_delayed_requeue_batches
batch_disabled = Resque::Scheduler.disable_delayed_requeue_batches
batch_size = Resque::Scheduler.delayed_requeue_batch_size
setup do
Resque::Scheduler.quiet = true
Resque.data_store.redis.flushall
Resque::Scheduler.enable_delayed_requeue_batches = false
Resque::Scheduler.disable_delayed_requeue_batches = true
Resque::Scheduler.delayed_requeue_batch_size = 1
end

teardown do
Resque::Scheduler.enable_delayed_requeue_batches = batch_enabled
Resque::Scheduler.disable_delayed_requeue_batches = batch_disabled
Resque::Scheduler.delayed_requeue_batch_size = batch_size
end

Expand All @@ -422,21 +422,21 @@ def assert_resque_key_exists?(key)
assert_equal(90, Resque.size(Resque.queue_from_class(SomeIvarJob)))
end

# TODO clean up timestamp?
# TODO clean up timestamp tests?
end

context "batch delayed item queue" do
batch_enabled = Resque::Scheduler.enable_delayed_requeue_batches
batch_disabled = Resque::Scheduler.disable_delayed_requeue_batches
batch_size = Resque::Scheduler.delayed_requeue_batch_size
setup do
Resque::Scheduler.quiet = true
Resque.data_store.redis.flushall
Resque::Scheduler.enable_delayed_requeue_batches = true
Resque::Scheduler.disable_delayed_requeue_batches = false
Resque::Scheduler.delayed_requeue_batch_size = 100
end

teardown do
Resque::Scheduler.enable_delayed_requeue_batches = batch_enabled
Resque::Scheduler.disable_delayed_requeue_batches = batch_disabled
Resque::Scheduler.delayed_requeue_batch_size = batch_size
end

Expand Down

0 comments on commit bef9950

Please sign in to comment.