small change in MapWriteKeyValuesRepo.set and remove duration of FullKeyValuesCacheRepoTests.creatingWorksProperly

This commit is contained in:
2024-08-02 23:02:24 +06:00
parent ea82a59f31
commit 8713fb04c5
2 changed files with 4 additions and 4 deletions

View File

@@ -110,9 +110,9 @@ class MapWriteKeyValuesRepo<Key, Value>(
override suspend fun set(toSet: Map<Key, List<Value>>) {
locker.withWriteLock {
toSet.forEach {
map[it.key] = it.value.toMutableList()
}
map.putAll(
toSet.mapValues { it.value.toMutableList() }
)
}
toSet.forEach { (k, v) ->
v.forEach {