Skip to content

kafka/tests: fix flaky unlicensed enterprise tests#29740

Draft
nguyen-andrew wants to merge 1 commit intoredpanda-data:devfrom
nguyen-andrew:ci-failure/unlicensed_reject_defaults
Draft

kafka/tests: fix flaky unlicensed enterprise tests#29740
nguyen-andrew wants to merge 1 commit intoredpanda-data:devfrom
nguyen-andrew:ci-failure/unlicensed_reject_defaults

Conversation

@nguyen-andrew
Copy link
Member

@nguyen-andrew nguyen-andrew commented Feb 28, 2026

The unlicensed_reject_defaults and unlicensed_rejected tests in create_topics_test.cc are flaky in CI. Two issues cause the tests to intermittently pass when they should enforce enterprise license checks:

  1. A race between revoke_license() and the async trial license init metrics_reporter::try_initialize_cluster_info(). If the init completed before revoke, should_sanction() is permissive.
  2. lconf().cloud_storage_enabled.set_value(true) only sets the config shard 0. If the Kafka handler runs on another shard, is_restricted() returns false.

This adds a wait_for_license_init() helper that waits for the async trial license to be initialized before revoking, and switches config mutations to update_cluster_config() to propagate to all shards.

Fixes CORE-15319

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

Wait for async trial license init before revoking, and use
update_cluster_config to propagate config to all shards.
@nguyen-andrew nguyen-andrew force-pushed the ci-failure/unlicensed_reject_defaults branch from 6996a93 to ec23951 Compare February 28, 2026 00:48
@nguyen-andrew
Copy link
Member Author

/rp-unit-test
debug
arch=arm64
ctest_args=-R create_topics_test_rpunit --timeout 1000 --repeat until-fail:500

@vbotbuildovich
Copy link
Collaborator

Invalid arch arm64 . Must be one of amd64,arm64.

Workflow run logs.

@nguyen-andrew
Copy link
Member Author

/rp-unit-test
debug
arch=arm64
ctest_args=-R create_topics_test_rpunit --timeout 1000 --repeat until-fail:500

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants