diff --git a/repos/cache/src/commonTest/kotlin/full/FullKeyValuesCacheRepoTests.kt b/repos/cache/src/commonTest/kotlin/full/FullKeyValuesCacheRepoTests.kt index 4a83b6874e0..c92a1a44881 100644 --- a/repos/cache/src/commonTest/kotlin/full/FullKeyValuesCacheRepoTests.kt +++ b/repos/cache/src/commonTest/kotlin/full/FullKeyValuesCacheRepoTests.kt @@ -10,7 +10,7 @@ import kotlin.test.* class FullKeyValuesCacheRepoTests { @Test - fun creatingWorksProperly() = runTest(timeout = 1.days) { + fun creatingWorksProperly() = runTest { val testData = (0 until 1000).associate { ("$it-" + uuid4().toString()) to (0 until 1000).map { "$it-" + uuid4().toString() diff --git a/repos/inmemory/src/commonMain/kotlin/dev/inmo/micro_utils/repos/MapKeyValuesRepo.kt b/repos/inmemory/src/commonMain/kotlin/dev/inmo/micro_utils/repos/MapKeyValuesRepo.kt index fb9bc5d8a7f..3a004120f92 100644 --- a/repos/inmemory/src/commonMain/kotlin/dev/inmo/micro_utils/repos/MapKeyValuesRepo.kt +++ b/repos/inmemory/src/commonMain/kotlin/dev/inmo/micro_utils/repos/MapKeyValuesRepo.kt @@ -110,9 +110,9 @@ class MapWriteKeyValuesRepo( override suspend fun set(toSet: Map>) { locker.withWriteLock { - toSet.forEach { - map[it.key] = it.value.toMutableList() - } + map.putAll( + toSet.mapValues { it.value.toMutableList() } + ) } toSet.forEach { (k, v) -> v.forEach {