A test failure can be reliably reproduced by putting a sleep after this line. There's nothing stopping the range deletion task from succeeding before that. Since this tests a test-only function I think we can remove the test or do setup like in this other test.
The same is true here. We should fix all instances of racy !isReady assertions in this file.