This test passes consistently when the test suite is run with a single thread. It fails consistently on MacOS when run as part of the unit-test suite. No idea why it passes in CI.