6 months ago

How to test a job when it fails?

Posted 6 months ago by Ranx99

I want to make sure that a job will be re-tried after x minutes when it fails:

class ExampleJob implements ShouldQueue
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public $retryAfter = 300;

    public function handle()

So if I have the above job, how can I test that it will be retried after 5 minutes when it fails?

Please sign in or create an account to participate in this conversation.