small improvement of test data in Full Cache tests

This commit is contained in:
InsanusMokrassar 2024-08-02 22:41:17 +06:00
parent 120e7228c7
commit 18f67cd4f2
3 changed files with 8 additions and 8 deletions

View File

@ -23,10 +23,10 @@ class FullCRUDCacheRepoTests {
@Test
fun creatingWorksProperly() = runTest {
val testData = (0 until 1000).map {
(it.toString() + uuid4().toString())
("$it-" + uuid4().toString())
}
val updatedTestData = (0 until 1000).map {
(it.toString() + uuid4().toString())
("$it-" + uuid4().toString())
}
val kvCache = MapKeyValueRepo<String, Registered>()
val crudRepo = MapCRUDRepo<Registered, String, New>(

View File

@ -13,10 +13,10 @@ class FullKeyValueCacheRepoTests {
@Test
fun creatingWorksProperly() = runTest {
val testData = (0 until 1000).associate {
(it.toString() + uuid4().toString()) to uuid4().toString()
("$it-" + uuid4().toString()) to "$it-" + uuid4().toString()
}
val updatedTestData = testData.keys.associateWith {
uuid4().toString()
"$it-" + uuid4().toString()
}
val kvCache = MapKeyValueRepo<String, String>()
val kvRepo = MapKeyValueRepo<String, String>()

View File

@ -12,17 +12,17 @@ class FullKeyValuesCacheRepoTests {
@Test
fun creatingWorksProperly() = runTest(timeout = 1.days) {
val testData = (0 until 1000).associate {
(it.toString() + uuid4().toString()) to (0 until 1000).map {
uuid4().toString()
("$it-" + uuid4().toString()) to (0 until 1000).map {
"$it-" + uuid4().toString()
}.sorted()
}
val updatedTestData = testData.keys.associateWith {
(0 until 1000).map {
uuid4().toString()
"$it-" + uuid4().toString()
}.sorted()
}
val addedData = testData.keys.associateWith {
uuid4().toString()
"$it-" + uuid4().toString()
}
val kvCache = MapKeyValueRepo<String, List<String>>()
val kvRepo = MapKeyValuesRepo<String, String>()