@@ -264,7 +264,7 @@ application context.
264
264
If you want a transaction to commit -- unusual, but occasionally useful when you want a
265
265
particular test to populate or modify the database -- the TestContext framework can be
266
266
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.
268
268
269
269
See transaction management with the <<testcontext-tx,TestContext framework>>.
270
270
@@ -3142,7 +3142,7 @@ See <<testing-examples-petclinic>> for an additional example.
3142
3142
3143
3143
By default, test transactions will be automatically rolled back after completion of the
3144
3144
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
3146
3146
<<integration-testing-annotations,annotation support>> section for further details.
3147
3147
3148
3148
[[testcontext-tx-programmatic-tx-mgt]]
@@ -3239,7 +3239,7 @@ declarative SQL script execution with default transaction rollback semantics.
3239
3239
@RunWith(SpringJUnit4ClassRunner.class)
3240
3240
@ContextConfiguration
3241
3241
@Transactional(transactionManager = "txMgr")
3242
- **@Rollback(false) **
3242
+ **@Commit **
3243
3243
public class FictitiousTransactionalTest {
3244
3244
3245
3245
**@BeforeTransaction**
@@ -3254,7 +3254,7 @@ declarative SQL script execution with default transaction rollback semantics.
3254
3254
3255
3255
@Test
3256
3256
// overrides the class-level default rollback setting
3257
- **@Rollback(true) **
3257
+ **@Rollback**
3258
3258
public void modifyDatabaseWithinTransaction() {
3259
3259
// logic which uses the test data and modifies database state
3260
3260
}
0 commit comments