Skip to content

Commit 44020f9

Browse files
dirk39leadspark
authored andcommitted
update rdKafka test
1 parent a07b0f9 commit 44020f9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/rdkafka/Tests/RdKafkaContextTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public function testShouldInjectItsSerializerToConsumer()
7272

7373
public function testShouldNotCreateConsumerTwice()
7474
{
75-
$context = new RdKafkaContext([]);
75+
$context = new RdKafkaContext(['global' => [
76+
'group.id' => uniqid('', true),
77+
]]);
7678
$queue = $context->createQueue('aQueue');
7779

7880
$consumer = $context->createConsumer($queue);
@@ -83,9 +85,11 @@ public function testShouldNotCreateConsumerTwice()
8385

8486
public function testShouldCreateTwoConsumers()
8587
{
86-
$context = new RdKafkaContext([]);
88+
$context = new RdKafkaContext(['global' => [
89+
'group.id' => uniqid('', true),
90+
]]);
8791
$queueA = $context->createQueue('aQueue');
88-
$queueB = $context->createQueue('aQueue');
92+
$queueB = $context->createQueue('bQueue');
8993

9094
$consumer = $context->createConsumer($queueA);
9195
$consumer2 = $context->createConsumer($queueB);

0 commit comments

Comments
 (0)