Ranx99's avatar

How to test a job when it fails?

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()
    {
	    //code
    }
}

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

0 likes
0 replies

Please or to participate in this conversation.