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:
@@ -5056,7 +5056,7 @@ hierarchy runs within a transaction. Test methods that are not annotated with
|
||||
that `@Transactional` is not supported on test lifecycle methods — for example, methods
|
||||
annotated with JUnit Jupiter's `@BeforeAll`, `@BeforeEach`, etc. Furthermore, tests that
|
||||
are annotated with `@Transactional` but have the `propagation` attribute set to
|
||||
`NOT_SUPPORTED` are not run within a transaction.
|
||||
`NOT_SUPPORTED` or `NEVER` are not run within a transaction.
|
||||
|
||||
[[testcontext-tx-attribute-support]]
|
||||
.`@Transactional` attribute support
|
||||
@@ -5065,7 +5065,7 @@ are annotated with `@Transactional` but have the `propagation` attribute set to
|
||||
|
||||
|`value` and `transactionManager` |yes
|
||||
|
||||
|`propagation` |only `Propagation.NOT_SUPPORTED` is supported
|
||||
|`propagation` |only `Propagation.NOT_SUPPORTED` and `Propagation.NEVER` are supported
|
||||
|
||||
|`isolation` |no
|
||||
|
||||
|
||||
Reference in New Issue
Block a user