Skip to content

Conversation

@Ankith-Confluent
Copy link
Member

@Ankith-Confluent Ankith-Confluent commented Sep 22, 2025

This PR refactors the librdkafka test suite to improve cloud compatibility by adding configurable options in test.conf. This enables better test portability and maintainability across different Kafka environments.

Changes

1. Configurable Test Framework

  • test.skip.idempotent: Skip tests requiring idempotent producer (replaces -I flag)
  • test.supported.acks: Configure supported acknowledgment values (e.g., -1,0,1)
  • test.sleep.multiplier: Configurable sleep multiplier for different environments. Multiplies explicit sleep_for() delays for cluster state propagation (set 0 to skip sleeps), different from test.timeout.multiplier which multiplies API operation timeouts (can't be disabled).
  • test.timeout.multiplier: Unified timeout scaling (existing feature, now consistently used)
  • test.skip.numbers: Skip specific tests by number (comma-separated list)

2. Topic Cleanup

  • Many tests were creating topics, but not deleting them.
  • Added topic delete utility.

3. Replication Factor

  • Changed hardcoded replication factors to use broker defaults (-1)

4. Preprocessor Directives for Version Compatibility

  • Added preprocessor directives to support librdkafka versions 2.0 through 2.11

🔧 Configuration Examples

test.timeout.multiplier=2.0
test.sleep.multiplier=3.0
test.supported.acks=-1,1
test.skip.idempotent=true
test.skip.numbers=0011,0055,0063,0068,0081,0086

@k-raina
Copy link
Member

k-raina commented Nov 4, 2025

@milindl @Ankith-Confluent @emasab
Anything pending in this PR? Can we merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants