Skip to content

Commit

Permalink
test: fix controller_id
Browse files Browse the repository at this point in the history
  • Loading branch information
qkdreyer committed Jul 15, 2024
1 parent de55014 commit f8d7043
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/controller_id.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ if (RD_KAFKA_VERSION >= 0x090000 && false !== getenv('TEST_KAFKA_BROKER_VERSION'
}
$conf->set('metadata.broker.list', getenv('TEST_KAFKA_BROKERS'));

$conf->setDrMsgCb(function ($rdkafka, $msg) {
var_dump($rdkafka, $msg);
});

$producer = new RdKafka\Producer($conf);
echo $producer->getControllerId() . \PHP_EOL;

$consumer = new RdKafka\Consumer($conf);
echo $consumer->getControllerId() . \PHP_EOL;

$conf->set('group.id','test');
$kafkaConsumer = new RdKafka\KafkaConsumer($conf);

echo $producer->getControllerId() . \PHP_EOL;
echo $consumer->getControllerId() . \PHP_EOL;
echo $kafkaConsumer->getControllerId() . \PHP_EOL;
--EXPECT--
1
Expand Down

0 comments on commit f8d7043

Please sign in to comment.