Skip to content

Commit 6e17f54

Browse files
committed
[12.x] using redis cluster compatible queue name in test
1 parent 52afee5 commit 6e17f54

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/Integration/Queue/JobChainingTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,19 +398,20 @@ public function testBatchCanBeAddedToChain()
398398

399399
public function testBatchInChainUsesCorrectQueue()
400400
{
401+
$otherQueue = $this->getQueueDriver() === 'redis' ? '{other}' : 'other';
401402
Bus::chain([
402-
(new JobChainingNamedTestJob('c1'))->onQueue('other'),
403-
(new JobChainingNamedTestJob('c2'))->onQueue('other'),
403+
(new JobChainingNamedTestJob('c1'))->onQueue($otherQueue),
404+
(new JobChainingNamedTestJob('c2'))->onQueue($otherQueue),
404405
Bus::batch([
405406
new JobChainingTestBatchedJob('b1'),
406407
new JobChainingTestBatchedJob('b2'),
407408
new JobChainingTestBatchedJob('b3'),
408409
new JobChainingTestBatchedJob('b4'),
409-
])->onQueue('other'),
410-
(new JobChainingNamedTestJob('c3'))->onQueue('other'),
410+
])->onQueue($otherQueue),
411+
(new JobChainingNamedTestJob('c3'))->onQueue($otherQueue),
411412
])->dispatch();
412413

413-
$this->runQueueWorkerCommand(['--queue' => 'other', '--stop-when-empty' => true]);
414+
$this->runQueueWorkerCommand(['--queue' => $otherQueue, '--stop-when-empty' => true]);
414415

415416
$this->assertEquals(['c1', 'c2', 'b1', 'b2', 'b3', 'b4', 'c3'], JobRunRecorder::$results);
416417
}

0 commit comments

Comments
 (0)