Skip to content

Commit 71f6721

Browse files
committed
Skip unsupported exponential backoff on 7.x and below
1 parent e3e01c6 commit 71f6721

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/QueueTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ public function test_backoff_from_job()
344344

345345
// Act
346346
$failingJob = new FailingJob();
347-
$failingJob->backoff = 123;
347+
$prop = version_compare(app()->version(), '8.0.0', '<') ? 'delay' : 'backoff';
348+
$failingJob->$prop = 123;
348349
$this->dispatch($failingJob)->run();
349350

350351
// Assert
@@ -357,6 +358,10 @@ public function test_backoff_from_job()
357358
/** @test */
358359
public function test_exponential_backoff_from_job_method()
359360
{
361+
if (version_compare(app()->version(), '8.0.0', '<')) {
362+
$this->markTestSkipped('Not supported by Laravel 7.x and below.');
363+
}
364+
360365
// Arrange
361366
Carbon::setTestNow(now()->addDay());
362367
CloudTasksApi::fake();

0 commit comments

Comments
 (0)