Sha256: 31b7f53d3355b192de282b387e4d352c950e9ffdf19b9c68e77f7f9f437159ee
Contents?: true
Size: 814 Bytes
Versions: 11
Compression:
Stored size: 814 Bytes
Contents
require 'test_helper' class IgnoreExceptionsTest < Minitest::Test def setup Resque.redis.flushall @worker = Resque::Worker.new(:testing) @worker.register_worker end def test_ignore_exceptions Resque.enqueue(IgnoreExceptionsJob) retry_key = IgnoreExceptionsJob.redis_retry_key IgnoreExceptionsJob.stubs(:perform).raises(AnotherCustomException) perform_next_job(@worker) assert_equal '0', Resque.redis.get(retry_key), 'retry counter' IgnoreExceptionsJob.stubs(:perform).raises(AnotherCustomException) perform_next_job(@worker) assert_equal '1', Resque.redis.get(retry_key), 'retry counter' IgnoreExceptionsJob.stubs(:perform).raises(CustomException) perform_next_job(@worker) assert_equal '1', Resque.redis.get(retry_key), 'retry counter' end end
Version data entries
11 entries across 11 versions & 1 rubygems