From ccfa93af17a385d23b641aa1a6c81f51f5f4de03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Tue, 12 Sep 2023 11:17:37 +0200 Subject: [PATCH] Polishing. See #2926 --- .../CoroutineCrudRepositoryCustomImplementationUnitTests.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/org/springframework/data/repository/kotlin/CoroutineCrudRepositoryCustomImplementationUnitTests.kt b/src/test/kotlin/org/springframework/data/repository/kotlin/CoroutineCrudRepositoryCustomImplementationUnitTests.kt index e0758f026c..fe756e5b0f 100644 --- a/src/test/kotlin/org/springframework/data/repository/kotlin/CoroutineCrudRepositoryCustomImplementationUnitTests.kt +++ b/src/test/kotlin/org/springframework/data/repository/kotlin/CoroutineCrudRepositoryCustomImplementationUnitTests.kt @@ -16,6 +16,7 @@ package org.springframework.data.repository.kotlin import io.mockk.mockk +import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.BeforeEach @@ -45,7 +46,7 @@ class CoroutineCrudRepositoryCustomImplementationUnitTests { } @Test // DATACMNS-1508 - fun shouldInvokeFindAll() { + fun shouldInvokeFindOne() { val result = runBlocking { coRepository.findOne("foo") @@ -71,6 +72,7 @@ class CoroutineCrudRepositoryCustomImplementationUnitTests { class MyCustomCoRepositoryImpl : MyCustomCoRepository { override suspend fun findOne(id: String): User { + delay(1) return User() } }