GH-28632: Add @NestedTestConfiguration(OVERRIDE) example to docs#36898
Open
won-seoop wants to merge 2 commits into
Open
GH-28632: Add @NestedTestConfiguration(OVERRIDE) example to docs#36898won-seoop wants to merge 2 commits into
won-seoop wants to merge 2 commits into
Conversation
…th examples Expand the "Transaction management for @SQL" section in the reference manual to explain the practical difference between INFERRED and ISOLATED transaction modes: - Split the section into dedicated subsections for each mode - Document INFERRED behavior: participates in the active test transaction, so script changes roll back together with the test method - Document when to use ISOLATED: when committed data must be visible to code that opens its own transaction, along with a cleanup pattern using AFTER_TEST_METHOD Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…le to docs Add a Java and Kotlin code example demonstrating how to use @NestedTestConfiguration(EnclosingConfiguration.OVERRIDE) to opt a specific @nested test class out of inheriting Spring configuration from its enclosing class, and supply a dedicated @SpringJUnitConfig instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Adds a Java and Kotlin code example to the
@Nestedtest class configuration section of the reference manual (support-classes.adoc) demonstrating@NestedTestConfiguration(EnclosingConfiguration.OVERRIDE).The existing example only shows the default
INHERITbehavior (configuration inherited from the enclosing class). The new example shows the complementaryOVERRIDEcase: a@Nestedclass that opts out of inheriting from its enclosing class and declares its own@SpringJUnitConfiginstead.The example follows the same "Hello World"
GreetingServiceTestscontext established in the section, adding aSpecialCaseTestsinner class to illustrate the use ofOVERRIDE.Also adds a note that
EnclosingConfigurationis statically imported fromNestedTestConfiguration.EnclosingConfiguration.Related issues
@NestedTestConfiguration#28632🤖 Generated with Claude Code