Apr 8, 2020
0
Level 2
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?
Please or to participate in this conversation.