From f8d7043e506b10b20893584933e88e45de146972 Mon Sep 17 00:00:00 2001 From: qkdreyer Date: Mon, 15 Jul 2024 16:48:56 +0200 Subject: [PATCH] test: fix controller_id --- tests/controller_id.phpt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/controller_id.phpt b/tests/controller_id.phpt index 19a14714..eec35083 100644 --- a/tests/controller_id.phpt +++ b/tests/controller_id.phpt @@ -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