Skip to content

Commit e6d0c2e

Browse files
authored
hide internal const (#2)
* hide internal const, rename version const * rename consts * adjust tests * fix test
1 parent 9f82611 commit e6d0c2e

File tree

5 files changed

+1
-16
lines changed

5 files changed

+1
-16
lines changed

kafka.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,10 @@ void register_err_constants(INIT_FUNC_ARGS) /* {{{ */
316316
*/
317317
PHP_MINIT_FUNCTION(kafka)
318318
{
319-
COPY_CONSTANT(RD_KAFKA_CONSUMER);
320319
COPY_CONSTANT(RD_KAFKA_OFFSET_BEGINNING);
321320
COPY_CONSTANT(RD_KAFKA_OFFSET_END);
322321
COPY_CONSTANT(RD_KAFKA_OFFSET_STORED);
323322
COPY_CONSTANT(RD_KAFKA_PARTITION_UA);
324-
COPY_CONSTANT(RD_KAFKA_PRODUCER);
325323
COPY_CONSTANT(RD_KAFKA_MSG_F_BLOCK);
326324
COPY_CONSTANT(RD_KAFKA_PURGE_F_QUEUE);
327325
COPY_CONSTANT(RD_KAFKA_PURGE_F_INFLIGHT);

tests/init_transaction_not_configured.phpt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ initTransaction() not configured
55
require __DIR__ . '/integration-tests-check.php';
66

77
$conf = new Kafka\Configuration();
8-
if (RD_KAFKA_VERSION >= 0x090000 && false !== getenv('TEST_KAFKA_BROKER_VERSION')) {
9-
$conf->set('broker.version.fallback', getenv('TEST_KAFKA_BROKER_VERSION'));
10-
}
118

129
$conf->set('metadata.broker.list', getenv('TEST_KAFKA_BROKERS'));
1310

@@ -26,4 +23,4 @@ try {
2623
_NOT_CONFIGURED
2724
-145
2825
%s/tests/init_transaction_not_configured.php
29-
14
26+
11

tests/produce_consume.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ require __DIR__ . '/integration-tests-check.php';
1010
$delivered = 0;
1111

1212
$conf = new Kafka\Configuration();
13-
if (RD_KAFKA_VERSION >= 0x090000 && false !== getenv('TEST_KAFKA_BROKER_VERSION')) {
14-
$conf->set('broker.version.fallback', getenv('TEST_KAFKA_BROKER_VERSION'));
15-
}
1613
$conf->setErrorCb(function ($producer, $errorCode, $errstr) {
1714
printf("%s: %s\n", rd_kafka_err2str($errorCode), $errstr);
1815
exit;

tests/produce_consume_transactional.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ $delivered = 0;
1414

1515
$conf = new Kafka\Configuration();
1616
$conf->set('transactional.id', 'transactional-producer');
17-
if (RD_KAFKA_VERSION >= 0x090000 && false !== getenv('TEST_KAFKA_BROKER_VERSION')) {
18-
$conf->set('broker.version.fallback', getenv('TEST_KAFKA_BROKER_VERSION'));
19-
}
2017

2118
$conf->setErrorCb(function ($producer, $errorCode, $errstr) {
2219
printf("%s: %s\n", rd_kafka_err2str($errorCode), $errstr);

tests/test_env.php.sample

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
if (false === getenv('TEST_KAFKA_BROKERS')) {
44
putenv('TEST_KAFKA_BROKERS=localhost:9092');
55
}
6-
7-
if (false === getenv('TEST_KAFKA_BROKER_VERSION')) {
8-
putenv('TEST_KAFKA_BROKER_VERSION=2.3');
9-
}

0 commit comments

Comments
 (0)