|
|
@ -23,8 +23,8 @@ import org.junit.After; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.rules.ExpectedException; |
|
|
|
import org.junit.rules.ExpectedException; |
|
|
|
|
|
|
|
|
|
|
|
import org.mockito.BDDMockito; |
|
|
|
import org.mockito.BDDMockito; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.core.annotation.AliasFor; |
|
|
|
import org.springframework.core.annotation.AliasFor; |
|
|
|
import org.springframework.test.annotation.Commit; |
|
|
|
import org.springframework.test.annotation.Commit; |
|
|
@ -51,7 +51,6 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
private final PlatformTransactionManager tm = mock(PlatformTransactionManager.class); |
|
|
|
private final PlatformTransactionManager tm = mock(PlatformTransactionManager.class); |
|
|
|
|
|
|
|
|
|
|
|
private final TransactionalTestExecutionListener listener = new TransactionalTestExecutionListener() { |
|
|
|
private final TransactionalTestExecutionListener listener = new TransactionalTestExecutionListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected PlatformTransactionManager getTransactionManager(TestContext testContext, String qualifier) { |
|
|
|
protected PlatformTransactionManager getTransactionManager(TestContext testContext, String qualifier) { |
|
|
|
return tm; |
|
|
|
return tm; |
|
|
@ -64,100 +63,21 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
public ExpectedException exception = ExpectedException.none(); |
|
|
|
public ExpectedException exception = ExpectedException.none(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
assertBeforeTestMethodWithNonTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod(clazz, true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz, boolean invokedInTx) |
|
|
|
|
|
|
|
throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertEquals(invokedInTx, instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithNonTransactionalTestMethod(Class<? extends Invocable> clazz) |
|
|
|
|
|
|
|
throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertAfterTestMethodWithTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
assertAfterTestMethodWithNonTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
given(tm.getTransaction(BDDMockito.any(TransactionDefinition.class))).willReturn(new SimpleTransactionStatus()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
listener.afterTestMethod(testContext); |
|
|
|
|
|
|
|
assertTrue("callback should have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethodWithNonTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
listener.afterTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertIsRollback(Class<?> clazz, boolean rollback) throws NoSuchMethodException, Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("test")); |
|
|
|
|
|
|
|
assertEquals(rollback, listener.isRollback(testContext)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@After |
|
|
|
@After |
|
|
|
public void cleanUpThreadLocalStateForSubsequentTestClassesInSuite() { |
|
|
|
public void cleanUpThreadLocalStateForSubsequentTestClassesInSuite() { |
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* SPR-13895 |
|
|
|
@Test // SPR-13895
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void transactionalTestWithoutTransactionManager() throws Exception { |
|
|
|
public void transactionalTestWithoutTransactionManager() throws Exception { |
|
|
|
TransactionalTestExecutionListener listener = new TransactionalTestExecutionListener() { |
|
|
|
TransactionalTestExecutionListener listener = new TransactionalTestExecutionListener() { |
|
|
|
|
|
|
|
|
|
|
|
protected PlatformTransactionManager getTransactionManager(TestContext testContext, String qualifier) { |
|
|
|
protected PlatformTransactionManager getTransactionManager(TestContext testContext, String qualifier) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Class<? extends Invocable> clazz = TransactionalDeclaredOnClassLocallyTestCase.class; |
|
|
|
Class<? extends Invocable> clazz = TransactionalDeclaredOnClassLocallyTestCase.class; |
|
|
|
|
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
@ -172,7 +92,7 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IllegalStateException e) { |
|
|
|
catch (IllegalStateException e) { |
|
|
|
assertTrue(e.getMessage().startsWith( |
|
|
|
assertTrue(e.getMessage().startsWith( |
|
|
|
"Failed to retrieve PlatformTransactionManager for @Transactional test for test context")); |
|
|
|
"Failed to retrieve PlatformTransactionManager for @Transactional test")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -191,7 +111,7 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
// Note: not actually invoked within a transaction since the test class is
|
|
|
|
// Note: not actually invoked within a transaction since the test class is
|
|
|
|
// annotated with @MetaTxWithOverride(propagation = NOT_SUPPORTED)
|
|
|
|
// annotated with @MetaTxWithOverride(propagation = NOT_SUPPORTED)
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod( |
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod( |
|
|
|
TransactionalDeclaredOnClassViaMetaAnnotationWithOverrideTestCase.class, false); |
|
|
|
TransactionalDeclaredOnClassViaMetaAnnotationWithOverrideTestCase.class, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -199,7 +119,7 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
// Note: not actually invoked within a transaction since the method is
|
|
|
|
// Note: not actually invoked within a transaction since the method is
|
|
|
|
// annotated with @MetaTxWithOverride(propagation = NOT_SUPPORTED)
|
|
|
|
// annotated with @MetaTxWithOverride(propagation = NOT_SUPPORTED)
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod( |
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod( |
|
|
|
TransactionalDeclaredOnMethodViaMetaAnnotationWithOverrideTestCase.class, false); |
|
|
|
TransactionalDeclaredOnMethodViaMetaAnnotationWithOverrideTestCase.class, false); |
|
|
|
assertBeforeTestMethodWithNonTransactionalTestMethod(TransactionalDeclaredOnMethodViaMetaAnnotationWithOverrideTestCase.class); |
|
|
|
assertBeforeTestMethodWithNonTransactionalTestMethod(TransactionalDeclaredOnMethodViaMetaAnnotationWithOverrideTestCase.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -289,11 +209,84 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------
|
|
|
|
private void assertBeforeTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
assertBeforeTestMethodWithNonTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertBeforeTestMethodWithTransactionalTestMethod(clazz, true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz, boolean invokedInTx) |
|
|
|
|
|
|
|
throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertEquals(invokedInTx, instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertBeforeTestMethodWithNonTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
assertAfterTestMethodWithTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
assertAfterTestMethodWithNonTransactionalTestMethod(clazz); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethodWithTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); |
|
|
|
|
|
|
|
given(tm.getTransaction(BDDMockito.any(TransactionDefinition.class))).willReturn(new SimpleTransactionStatus()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
listener.afterTestMethod(testContext); |
|
|
|
|
|
|
|
assertTrue("callback should have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertAfterTestMethodWithNonTransactionalTestMethod(Class<? extends Invocable> clazz) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
Invocable instance = BeanUtils.instantiateClass(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestInstance()).willReturn(instance); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
TransactionContextHolder.removeCurrentTransactionContext(); |
|
|
|
|
|
|
|
listener.beforeTestMethod(testContext); |
|
|
|
|
|
|
|
listener.afterTestMethod(testContext); |
|
|
|
|
|
|
|
assertFalse("callback should not have been invoked", instance.invoked()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void assertIsRollback(Class<?> clazz, boolean rollback) throws Exception { |
|
|
|
|
|
|
|
BDDMockito.<Class<?>> given(testContext.getTestClass()).willReturn(clazz); |
|
|
|
|
|
|
|
given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("test")); |
|
|
|
|
|
|
|
assertEquals(rollback, listener.isRollback(testContext)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
private static @interface MetaTransactional { |
|
|
|
private @interface MetaTransactional { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
@ -308,12 +301,12 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@BeforeTransaction |
|
|
|
@BeforeTransaction |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
private static @interface MetaBeforeTransaction { |
|
|
|
private @interface MetaBeforeTransaction { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@AfterTransaction |
|
|
|
@AfterTransaction |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
private static @interface MetaAfterTransaction { |
|
|
|
private @interface MetaAfterTransaction { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private interface Invocable { |
|
|
|
private interface Invocable { |
|
|
@ -348,7 +341,6 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -361,11 +353,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -378,7 +368,6 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -391,11 +380,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@MetaTransactional |
|
|
|
@MetaTransactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -408,7 +395,6 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -421,11 +407,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@MetaTxWithOverride(propagation = NOT_SUPPORTED) |
|
|
|
@MetaTxWithOverride(propagation = NOT_SUPPORTED) |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -438,11 +422,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -455,11 +437,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -472,11 +452,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -489,11 +467,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -518,11 +494,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -531,11 +505,9 @@ public class TransactionalTestExecutionListenerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
public void transactionalTest() { |
|
|
|
public void transactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nonTransactionalTest() { |
|
|
|
public void nonTransactionalTest() { |
|
|
|
/* no-op */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|