Skip to content

Commit de2e201

Browse files
committed
Refer to @Commit instead of @Rollback(false) in the reference manual
1 parent bc13cb2 commit de2e201

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/asciidoc/testing.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ application context.
264264
If you want a transaction to commit -- unusual, but occasionally useful when you want a
265265
particular test to populate or modify the database -- the TestContext framework can be
266266
instructed to cause the transaction to commit instead of roll back via the
267-
<<integration-testing-annotations, `@Rollback`>> annotation.
267+
<<integration-testing-annotations, `@Commit`>> annotation.
268268

269269
See transaction management with the <<testcontext-tx,TestContext framework>>.
270270

@@ -3142,7 +3142,7 @@ See <<testing-examples-petclinic>> for an additional example.
31423142

31433143
By default, test transactions will be automatically rolled back after completion of the
31443144
test; however, transactional commit and rollback behavior can be configured declaratively
3145-
via the `@Rollback` annotation. See the corresponding entry in the
3145+
via the `@Commit` and `@Rollback` annotations. See the corresponding entries in the
31463146
<<integration-testing-annotations,annotation support>> section for further details.
31473147

31483148
[[testcontext-tx-programmatic-tx-mgt]]
@@ -3239,7 +3239,7 @@ declarative SQL script execution with default transaction rollback semantics.
32393239
@RunWith(SpringJUnit4ClassRunner.class)
32403240
@ContextConfiguration
32413241
@Transactional(transactionManager = "txMgr")
3242-
**@Rollback(false)**
3242+
**@Commit**
32433243
public class FictitiousTransactionalTest {
32443244
32453245
**@BeforeTransaction**
@@ -3254,7 +3254,7 @@ declarative SQL script execution with default transaction rollback semantics.
32543254
32553255
@Test
32563256
// overrides the class-level default rollback setting
3257-
**@Rollback(true)**
3257+
**@Rollback**
32583258
public void modifyDatabaseWithinTransaction() {
32593259
// logic which uses the test data and modifies database state
32603260
}

0 commit comments

Comments
 (0)