Gopal S Akshintala
08/28/2025, 3:24 PMAlex Kuznetsov
08/28/2025, 4:03 PMGopal S Akshintala
08/28/2025, 4:12 PMThe following 2 assertions failed:
io.kotest.assertions.MultiAssertionError: The following 2 assertions failed:
1) Test failed for (lruArgs, LRUCacheArgs(classMethodsToCall=[ClassMethodsToCall(arguments=["b", 2], method=insertKeyValuePair), ClassMethodsToCall(arguments=["a", 1], method=insertKeyValuePair), ClassMethodsToCall(arguments=["c", 3], method=insertKeyValuePair), ClassMethodsToCall(arguments=[], method=getMostRecentKey), ClassMethodsToCall(arguments=["a"], method=getValueFromKey), ClassMethodsToCall(arguments=[], method=getMostRecentKey), ClassMethodsToCall(arguments=["d", 4], method=insertKeyValuePair), ClassMethodsToCall(arguments=["b"], method=getValueFromKey), ClassMethodsToCall(arguments=["a", 5], method=insertKeyValuePair), ClassMethodsToCall(arguments=["a"], method=getValueFromKey)], maxSize=3)), (result, ([c, 1, a, null, 5], [(a, 5), (d, 4), (c, 3)])) with error java.util.ConcurrentModificationException
at java.base/java.util.HashMap.compute(HashMap.java:1326)
2) Test failed for (lruArgs, LRUCacheArgs(classMethodsToCall=[ClassMethodsToCall(arguments=["a", 1], method=insertKeyValuePair), ClassMethodsToCall(arguments=["b", 2], method=insertKeyValuePair), ClassMethodsToCall(arguments=["c", 3], method=insertKeyValuePair), ClassMethodsToCall(arguments=["d", 4], method=insertKeyValuePair), ClassMethodsToCall(arguments=["a"], method=getValueFromKey), ClassMethodsToCall(arguments=["b"], method=getValueFromKey), ClassMethodsToCall(arguments=["c"], method=getValueFromKey), ClassMethodsToCall(arguments=["d"], method=getValueFromKey), ClassMethodsToCall(arguments=["e", 5], method=insertKeyValuePair), ClassMethodsToCall(arguments=["a"], method=getValueFromKey), ClassMethodsToCall(arguments=["b"], method=getValueFromKey), ClassMethodsToCall(arguments=["c"], method=getValueFromKey), ClassMethodsToCall(arguments=["d"], method=getValueFromKey), ClassMethodsToCall(arguments=["e"], method=getValueFromKey)], maxSize=4)), (result, ([1, 2, 3, 4, null, 2, 3, 4, 5], [(e, 5), (d, 4), (c, 3), (b, 2)])) with error java.util.ConcurrentModificationException
at java.base/java.util.HashMap.compute(HashMap.java:1326)
at io.kotest.assertions.MultiAssertionErrorBuilder.build(multi.kt:27)
at io.kotest.data.ErrorCollector.assertAll(errors.kt:21)
at io.kotest.data.ForAll2Kt.forAll(forAll2.kt:59)
at algoexpert.ll.lrucache.LRUCacheTest$1$1.invokeSuspend(LRUCacheTest.kt:15)
at algoexpert.ll.lrucache.LRUCacheTest$1$1.invoke(LRUCacheTest.kt)
at algoexpert.ll.lrucache.LRUCacheTest$1$1.invoke(LRUCacheTest.kt)
at io.kotest.core.spec.style.scopes.StringSpecRootScope$invoke$1.invokeSuspend(StringSpecRootScope.kt:71)
at io.kotest.core.spec.style.scopes.StringSpecRootScope$invoke$1.invoke(StringSpecRootScope.kt)
Gopal S Akshintala
08/28/2025, 4:13 PMjava.util.ConcurrentModificationException