Closed belyaev-mikhail closed 3 years ago
Maybe the idea was to check newNode.ownedBy
instead of ownedBy
?
Anyway, removing the check fixes the test.
I'd love to provide a regression test, but have no idea how to reproduce this outside the node implementation.
Even random test triggers this exclusively on JVM, because JVM implementation of these tests (and no other platform) actually calls builder's remove(key, value)
method due to overloading witchcrafting, no other tests seem to call it under such stressful conditions.
Seems like some logic here is broken:
mutableUpdateNodeAtIndex
expectsnewNode
to be newly-created, butmutableReplaceNode
does not check for it properly (newNode
may be equal totargetNode
, which may be any node of any builder previously created)