Support Propagation.NEVER for disabling test-managed transactions
Prior to this commit only Propagation.NOT_SUPPORTED was supported for disabling test-managed transactions via the `propagation` attribute of `@Transactional`. This commit allows users to specify Propagation.NOT_SUPPORTED or Propagation.NEVER to disable test-managed transactions. Closes gh-25909
This commit is contained in:
@@ -134,7 +134,7 @@ class ProgrammaticTxMgmtTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||
@Transactional(propagation = Propagation.NEVER)
|
||||
void startTxWithNonExistentTransactionContext() {
|
||||
assertThatIllegalStateException().isThrownBy(TestTransaction::start);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ class ProgrammaticTxMgmtTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||
@Transactional(propagation = Propagation.NEVER)
|
||||
void endTxWithNonExistentTransactionContext() {
|
||||
assertThatIllegalStateException().isThrownBy(TestTransaction::end);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user