Cleanup changes pulled out of PR #12368#12672
Merged
kfaraz merged 1 commit intoapache:masterfrom Jun 23, 2022
Merged
Conversation
kfaraz
approved these changes
Jun 23, 2022
Contributor
kfaraz
left a comment
There was a problem hiding this comment.
Thanks for the refactoring, @paul-rogers !
The changes LGTM.
3 tasks
paul-rogers
added a commit
to paul-rogers/druid
that referenced
this pull request
Jun 24, 2022
2 tasks
abhishekagarwal87
pushed a commit
that referenced
this pull request
Jun 25, 2022
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.
The new IT PR has struggled to get a clean build due to the complexity and flakiness of the Druid build system. It is ironic that the attempt to fix the ITs has been stymied by the fragility of the existing ITs. Out of desperation, the big PR is being broken up into smaller chunks. This one provides the myriad cleanup tasks done in that PR.
The cleanup is of two kinds:
The general cleanup is self-explanatory. The JSON configs are odd beasts: there is no way to create one via code; only using the JSON config mechanism that populates the instance dynamically from a provided set of properties. While that is great in production, it does make it very hard to create the config in tests. Since we do, in fact, want to test, this PR alters a few of these configs to provide a constructor or factory method.
Further, the config key used for properties tends to reside in the consumer of those properties. If we do want to create one in tests, using the property mechanism, we have to copy/paste that key. To make life a bit easier here, this PR moves the key to a constant inside the config object itself (but only for those configs used by the IT PR.)
The ITs want to create a Guice instance for "client" use, not for use in a Druid server. The existing ITs jump though some amazing hoops to do this. The new ones take a somewhat different path. To make this possible, a few of the formerly-private bits related to Guice initialization are now exposed for use by tests.
This PR has: