mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-09 09:53:49 +00:00
update delay on creating tests in cache
This commit is contained in:
parent
efa869f91a
commit
e8232664f3
@ -3,6 +3,7 @@ package full
|
|||||||
import com.benasher44.uuid.uuid4
|
import com.benasher44.uuid.uuid4
|
||||||
import dev.inmo.micro_utils.repos.*
|
import dev.inmo.micro_utils.repos.*
|
||||||
import dev.inmo.micro_utils.repos.cache.full.FullKeyValueCacheRepo
|
import dev.inmo.micro_utils.repos.cache.full.FullKeyValueCacheRepo
|
||||||
|
import korlibs.time.seconds
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
@ -11,7 +12,7 @@ import kotlin.test.assertTrue
|
|||||||
|
|
||||||
class FullKeyValueCacheRepoTests {
|
class FullKeyValueCacheRepoTests {
|
||||||
@Test
|
@Test
|
||||||
fun creatingWorksProperly() = runTest {
|
fun creatingWorksProperly() = runTest(timeout = 120.seconds) {
|
||||||
val testData = (0 until 1000).associate {
|
val testData = (0 until 1000).associate {
|
||||||
("$it-" + uuid4().toString()) to "$it-" + uuid4().toString()
|
("$it-" + uuid4().toString()) to "$it-" + uuid4().toString()
|
||||||
}
|
}
|
||||||
@ -23,8 +24,7 @@ class FullKeyValueCacheRepoTests {
|
|||||||
|
|
||||||
val cacheRepo = FullKeyValueCacheRepo(
|
val cacheRepo = FullKeyValueCacheRepo(
|
||||||
kvRepo,
|
kvRepo,
|
||||||
kvCache,
|
kvCache
|
||||||
skipStartInvalidate = true
|
|
||||||
)
|
)
|
||||||
|
|
||||||
testData.forEach {
|
testData.forEach {
|
||||||
|
@ -5,13 +5,14 @@ import dev.inmo.micro_utils.repos.*
|
|||||||
import dev.inmo.micro_utils.repos.cache.full.FullKeyValuesCacheRepo
|
import dev.inmo.micro_utils.repos.cache.full.FullKeyValuesCacheRepo
|
||||||
import dev.inmo.micro_utils.repos.pagination.maxPagePagination
|
import dev.inmo.micro_utils.repos.pagination.maxPagePagination
|
||||||
import korlibs.time.days
|
import korlibs.time.days
|
||||||
|
import korlibs.time.seconds
|
||||||
import korlibs.time.years
|
import korlibs.time.years
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
class FullKeyValuesCacheRepoTests {
|
class FullKeyValuesCacheRepoTests {
|
||||||
@Test
|
@Test
|
||||||
fun creatingWorksProperly() = runTest {
|
fun creatingWorksProperly() = runTest(timeout = 120.seconds) {
|
||||||
val testData = (0 until 1000).associate {
|
val testData = (0 until 1000).associate {
|
||||||
("$it-" + uuid4().toString()) to (0 until 1000).map {
|
("$it-" + uuid4().toString()) to (0 until 1000).map {
|
||||||
"$it-" + uuid4().toString()
|
"$it-" + uuid4().toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user