Merge branch '6.0.x'

This commit is contained in:
Sébastien Deleuze
2023-06-23 14:20:13 +02:00
8 changed files with 42 additions and 47 deletions

View File

@@ -160,48 +160,48 @@ class CoroutinesAnnotationTransactionInterceptorTests {
open class TestWithCoroutines {
open suspend fun suspendingNoValueSuccess() {
delay(10)
delay(1)
}
open suspend fun suspendingNoValueFailure() {
delay(10)
delay(1)
throw IllegalStateException()
}
open suspend fun suspendingValueSuccess(): String {
delay(10)
delay(1)
return "foo"
}
open suspend fun suspendingValueFailure(): String {
delay(10)
delay(1)
throw IllegalStateException()
}
open fun flowSuccess(): Flow<String> {
return flow {
emit("foo")
delay(10)
delay(1)
emit("foo")
}
}
open suspend fun suspendingFlowSuccess(): Flow<String> {
delay(10)
delay(1)
return flow {
emit("foo")
delay(10)
delay(1)
emit("foo")
}
}
open suspend fun suspendingValueSuccessWithContext(): String {
delay(10)
delay(1)
return coroutineContext[ExampleContext.Key].toString()
}
open suspend fun suspendingValueFailureWithContext(): String {
delay(10)
delay(1)
throw IllegalStateException(coroutineContext[ExampleContext.Key].toString())
}
}

View File

@@ -337,17 +337,17 @@ abstract class AbstractCoroutinesTransactionAspectTests {
private var name: String? = null
override suspend fun getName(): String? {
delay(10)
delay(1)
return name
}
override suspend fun setName(name: String?) {
delay(10)
delay(1)
this.name = name
}
override suspend fun exceptional(t: Throwable?) {
delay(10)
delay(1)
if (t != null) {
throw t
}