Fix @Transactional support on suspending function

With this commit, @Transactional on suspending functions
returning a value now commits the transaction properly.

Closes gh-25998
This commit is contained in:
Sébastien Deleuze
2020-11-09 15:50:12 +01:00
parent 6bb3ad793e
commit 1f13516528
2 changed files with 2 additions and 4 deletions

View File

@@ -19,7 +19,6 @@ package org.springframework.transaction.annotation
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.springframework.aop.framework.ProxyFactory
import org.springframework.transaction.interceptor.TransactionInterceptor
@@ -64,7 +63,6 @@ class CoroutinesAnnotationTransactionInterceptorTests {
}
@Test
@Disabled("Currently fails due to gh-25998")
fun suspendingValueSuccess() {
val proxyFactory = ProxyFactory()
proxyFactory.setTarget(TestWithCoroutines())