New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINOR: Cleanup admin creation logic in integration tests #11790
Merged
jsancio
merged 6 commits into
apache:trunk
from
hachikuji:admin-creation-cleanup-integration-tests
Feb 24, 2022
Merged
MINOR: Cleanup admin creation logic in integration tests #11790
jsancio
merged 6 commits into
apache:trunk
from
hachikuji:admin-creation-cleanup-integration-tests
Feb 24, 2022
Conversation
This file contains 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
jsancio
reviewed
Feb 22, 2022
core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala
Outdated
Show resolved
Hide resolved
@jsancio Thanks for the comments. I've pushed an update. |
jsancio
reviewed
Feb 23, 2022
Should be good to merge after this round of feedback. Once again, thanks for cleanup TestUtils
and company.
core/src/main/scala/kafka/server/metadata/BrokerMetadataListener.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/integration/kafka/api/BaseProducerSendTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala
Outdated
Show resolved
Hide resolved
yyu1993
added a commit
to confluentinc/kafka
that referenced
this issue
Feb 25, 2022
* apache-kafka/trunk: (49 commits) KAFKA-12738: send LeaveGroup request when thread dies to optimize replacement time (apache#11801) MINOR: Skip fsync on parent directory to start Kafka on ZOS (apache#11793) KAFKA-12738: track processing errors and implement constant-time task backoff (apache#11787) MINOR: Cleanup admin creation logic in integration tests (apache#11790) KAFKA-10199: Add interface for state updater (apache#11499) KAFKA-10000: Utils methods for overriding user-supplied properties and dealing with Enum types (apache#11774) KAFKA-10000: Add new metrics for source task transactions (apache#11772) KAFKA-13676: Commit successfully processed tasks on error (apache#11791) KAFKA-13511: Add support for different unix precisions in TimestampConverter SMT (apache#11575) MINOR: Improve Connect docs (apache#11642) ...
wcarlson5
added a commit
to wcarlson5/kafka
that referenced
this issue
Feb 28, 2022
There seemed to be a little sloppiness in the integration tests in regard to admin client creation. Not only was there duplicated logic, but it wasn't always clear which listener the admin client was targeting. This made it difficult to tell in the context of authorization tests whether we were indeed testing with the right principal. As an example, we had a method in TestUtils which was using the inter-broker listener implicitly. This meant that the test was using the broker principal which had super user privilege. This was intentional, but I think it would be clearer to make the dependence on this listener explicit. This patch attempts to clean this up a bit by consolidating some of the admin creation logic and making the reliance on the listener clearer. Reviewers: José Armando García Sancio <[email protected]>
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.
There seemed to be a little sloppiness in the integration tests in regard to admin client creation. Not only was there duplicated logic, but it wasn't always clear which listener the admin client was targeting. This made it difficult to tell in the context of authorization tests whether we were indeed testing with the right principal. As an example, we had a method in
TestUtils
which was using the inter-broker listener implicitly. This meant that the test was using the broker principal which had super user privilege. This was intentional, but I think it would be clearer to make the dependence on this listener explicit. This patch attempts to clean this up a bit by consolidating some of the admin creation logic and making the reliance on the listener clearer.Committer Checklist (excluded from commit message)