Repository navigation
Extract Bootstrap and ServerBootstrap setup to a common method - #15134
Merged
Merged
Conversation
This commit refactors the FixedChannelPoolTest class to extract the repetitive setup of Bootstrap and ServerBootstrap into a private bootstrap() method. This improves code readability and reduces redundancy across multiple test methods.
Member
|
@diegolovison thanks |
Contributor
Author
|
@normanmaurer can you please take a look at #15133 ? |
normanmaurer
added a commit
that referenced
this pull request
Aug 14, 2026
… (#17289) This commit refactors the `FixedChannelPoolTest` class to extract the repetitive setup of Bootstrap and ServerBootstrap into a private `bootstrap()` method. This improves code readability and reduces redundancy across multiple test methods. **Motivation:** The `FixedChannelPoolTest` class contained repetitive code for setting up `Bootstrap` and `ServerBootstrap` instances in multiple test methods. This will also reduce the effort to create new tests that are coming as part of * #14723 * #15133 **Modification:** A new private method `bootstrap()` was introduced within the `FixedChannelPoolTest` class. This method encapsulates the creation and configuration of a `LocalAddress`, a `Bootstrap` configured for `LocalChannel`, and a `ServerBootstrap` configured for `LocalServerChannel`. Co-authored-by: Diego Lovison <[email protected]>
lltopk
pushed a commit
to lltopk/netty
that referenced
this pull request
Oct 24, 2026
…#15134) (netty#17289) This commit refactors the `FixedChannelPoolTest` class to extract the repetitive setup of Bootstrap and ServerBootstrap into a private `bootstrap()` method. This improves code readability and reduces redundancy across multiple test methods. **Motivation:** The `FixedChannelPoolTest` class contained repetitive code for setting up `Bootstrap` and `ServerBootstrap` instances in multiple test methods. This will also reduce the effort to create new tests that are coming as part of * netty#14723 * netty#15133 **Modification:** A new private method `bootstrap()` was introduced within the `FixedChannelPoolTest` class. This method encapsulates the creation and configuration of a `LocalAddress`, a `Bootstrap` configured for `LocalChannel`, and a `ServerBootstrap` configured for `LocalServerChannel`. Co-authored-by: Diego Lovison <[email protected]>
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.
This commit refactors the
FixedChannelPoolTestclass to extract the repetitive setup of Bootstrap and ServerBootstrap into a privatebootstrap()method. This improves code readability and reduces redundancy across multiple test methods.Motivation:
The
FixedChannelPoolTestclass contained repetitive code for setting upBootstrapandServerBootstrapinstances in multiple test methods.This will also reduce the effort to create new tests that are coming as part of
Modification:
A new private method
bootstrap()was introduced within theFixedChannelPoolTestclass. This method encapsulates the creation and configuration of aLocalAddress, aBootstrapconfigured forLocalChannel, and aServerBootstrapconfigured forLocalServerChannel.