Repository navigation
Extract Bootstrap and ServerBootstrap setup to a common method (#15134) - #17289
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. **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`.
Member
Author
|
Cherry-pick 817c7aa to make things easier to port back to 4.1 |
🚨 TestLens detected 1 failed test 🚨Here is what you can do:
Test SummaryBuild PR / linux-x86_64-java21 build > Netty/Testsuite
🏷️ Commit: c9bf6fa Test FailuresDatagramUnicastIPv6MappedTest > testSimpleSendCompositeDirectByteBuf(TestInfo) (Netty/Testsuite in Build PR / linux-x86_64-java21 build)Muted TestsNote Checks are currently running using the configuration below. Select tests to mute in this pull request: 🔲 DatagramUnicastIPv6MappedTest > testSimpleSendCompositeDirectByteBuf(TestInfo) Reuse successful test results: 🔲 ♻️ Only rerun the tests that failed or were muted before Click the checkbox to trigger a rerun: 🔲 Rerun jobs Learn more about TestLens at testlens.app. |
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 therepetitive setup of Bootstrap and ServerBootstrap into a private
bootstrap()method. This improves code readability and reducesredundancy across multiple test methods.
Motivation:
The
FixedChannelPoolTestclass contained repetitive code for settingup
BootstrapandServerBootstrapinstances 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 andconfiguration of a
LocalAddress, aBootstrapconfigured forLocalChannel, and aServerBootstrapconfigured forLocalServerChannel.