diff --git a/src/asciidoc/testing.adoc b/src/asciidoc/testing.adoc index 722235a185..8a23571df6 100644 --- a/src/asciidoc/testing.adoc +++ b/src/asciidoc/testing.adoc @@ -826,16 +826,16 @@ after the test method has completed. `@Commit` can be used as a direct replaceme Indicates whether the transaction for a transactional test method should be __rolled back__ after the test method has completed. If `true`, the transaction is rolled back; -otherwise, the transaction is committed. Rollback semantics for integration tests in the -Spring TestContext Framework default to `true` even if `@Rollback` is not explicitly -declared. +otherwise, the transaction is committed (see also `@Commit`). Rollback semantics for +integration tests in the Spring TestContext Framework default to `true` even if +`@Rollback` is not explicitly declared. + When declared as a class-level annotation, `@Rollback` defines the default rollback semantics for all test methods within the test class hierarchy. When declared as a method-level annotation, `@Rollback` defines rollback semantics for the specific test -method, potentially overriding class-level default rollback semantics. +method, potentially overriding class-level `@Rollback` or `@Commit` semantics. + @@ -3255,7 +3255,7 @@ declarative SQL script execution with default transaction rollback semantics. } @Test - // overrides the class-level default rollback setting + // overrides the class-level @Commit setting **@Rollback** public void modifyDatabaseWithinTransaction() { // logic which uses the test data and modifies database state