[improve][test]Add test: test/testTopicPartitionCannotBeCreatedAfterTopicDeleted#26038
Merged
merlimat merged 2 commits intoJun 18, 2026
Conversation
merlimat
approved these changes
Jun 18, 2026
Member
|
#24118 is missing from branch-4.0, so I'll revert this test from branch-4.0. |
lhotari
added a commit
that referenced
this pull request
Jun 29, 2026
…edAfterTopicDeleted (#26038)" This reverts commit 85ee3b9. The test testTopicPartitionCannotBeCreatedAfterTopicDeleted (added by #26038) is a regression test for the topic consistency check introduced on master by #24118 ("[fix][broker] Add topic consistency check"). That broker-side check (NamespaceService/BrokerService) prevents a partition from being re-created / loaded once its partitioned-topic metadata has been deleted, which is what the test asserts via assertFalse(producer.isConnected()). On branch-4.0, #24118 was deliberately reverted (eef20ed) and its master replacement PIP-414 (#24213) was never backported, so the consistency-check behavior the test relies on is absent. Without it, a reconnecting producer can race the topic deletion and re-create the partition, so the producer stays connected and the test fails ("expected [false] but found [true]", SimpleProducerConsumerTest.java:5465). #26038 is a test-only PR that should not have been cherry-picked to branch-4.0 without its prerequisite production fix. Reverting the test restores a green build; the underlying feature remains intentionally absent on this branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#24118 added a check that prevents partition creation if there is no partitioned topic metadata.
Modifications
Adds a new test to cover more cases: producer reconnects will not create up the partition once a partitioned topic was deleted.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes