From d3dd01e22770be4015085910111f597d295dfaef Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 27 Sep 2024 11:06:30 +0200 Subject: [PATCH] Adapt transactional test component declaration See gh-33470 --- .../TransactionalApplicationListenerMethodAdapterTests.java | 1 - .../transaction/event/TransactionalEventListenerTests.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalApplicationListenerMethodAdapterTests.java b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalApplicationListenerMethodAdapterTests.java index 0143cbd868fa..23485164f0c2 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalApplicationListenerMethodAdapterTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalApplicationListenerMethodAdapterTests.java @@ -28,7 +28,6 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.RestrictedTransactionalEventListenerFactory; import org.springframework.transaction.annotation.Transactional; -import org.springframework.transaction.event.TransactionalApplicationListenerMethodAdapterTests.SampleEvents.SampleEventsWithTransactionalAnnotation; import org.springframework.transaction.support.TransactionSynchronization; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.ClassUtils; diff --git a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java index 17cbf356082d..4cf080a82fe3 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java @@ -611,7 +611,7 @@ interface TransactionalComponentTestInterface { } - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) @Component static class TransactionalComponentTestListenerWithInterface extends BaseTransactionalTestListener implements TransactionalComponentTestInterface {