Closed jhump closed 7 months ago
range over
newMap
🤦, yes, that's exactly what it is. Great observation! That's why on both failed runs it doesn't show up until later in the test, and it's always between "g" and "h" (two elements in the map, so some iterations they are inserted in one order, others the opposite order).
Perhaps the sift up/down ops inside the heap impl are not entirely deterministic? It seemed rather consistent in my tests, and has mostly been true in CI. And yet there were also these two failures 🤔:
https://github.com/bufbuild/httplb/actions/runs/8754637253/job/24026890423 https://github.com/bufbuild/httplb/actions/runs/8755567093/job/24029992149
So this adjusts the test to not care about precise order. Instead, it only cares about distinctness of the items picked.
Edit: source of non-determinism was use of a map inside the implementation of
update
, nothing to do with any non-determinism in the container/heap package.