Add a builder class for TestDruidCoordinatorConfig#12624
Merged
capistrant merged 5 commits intoJun 16, 2022
Conversation
kfaraz
approved these changes
Jun 10, 2022
Contributor
kfaraz
left a comment
There was a problem hiding this comment.
Thanks for refactoring this, @capistrant!
The code looks much cleaner now.
kfaraz
reviewed
Jun 10, 2022
| private final Duration coordinatorDatasourceKillPeriod; | ||
| private final Duration coordinatorDatasourceKillDurationToRetain; | ||
| private final Duration getLoadQueuePeonRepeatDelay; | ||
| private final Duration loadQueuePeonRepeatDelay; |
kfaraz
reviewed
Jun 10, 2022
| { | ||
| } | ||
|
|
||
| public Builder( |
Contributor
There was a problem hiding this comment.
Where is this constructor used?
Contributor
Author
There was a problem hiding this comment.
ya, that is unused. I removed. If needed in the future it can be easily created with code gen
kfaraz
reviewed
Jun 10, 2022
| return this; | ||
| } | ||
|
|
||
| //TODO add mising fields to both TEst and builder.build investigate loadTimeoutDelay naming in Test. Migrate usage to builder. |
Contributor
Author
There was a problem hiding this comment.
ah, I actually did the work but forgot to remove my reminder. deleted.
kfaraz
requested changes
Jun 10, 2022
Contributor
kfaraz
left a comment
There was a problem hiding this comment.
On second glance, there seem to be some minor things that need to be addressed. :)
kfaraz
reviewed
Jun 10, 2022
|
|
||
| public Builder withHttpLoadQueuePeonHostTimeout(Duration withHttploadQueuePeonHostTimeout) | ||
| public Builder withHttpLoadQueuePeonHostTimeout(Duration httpLoadQueuePeonHostTimeout) | ||
|
|
kfaraz
approved these changes
Jun 10, 2022
Contributor
|
This PR and several others are failing the packaging check with this message: I think #12632 should fix this issue. |
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.
Description
Cleans up a mess in the Unit testing world.
TestDruidCoordinatorConfigis instantiated all over the place. When we updateDruidCoordinatorConfigwe shouldn't have to be updating the constructor for the test class in a ton of places if the new config is not applicable to the test. Instead the Builder will just automatically leverage the default. This should make future PRs related to coordinator configs less littered with one line changes to constructors.Key changed/added classes in this PR
TestDruidCoordinatorConfigThis PR has: