This test creates two shards with a chunk in each one. It then inserts documents to both and inserts some orphans directly to one of the shards. However, the initial moveChunk command will queue the chunk for deletion on the first shard asynchronously and may not run until after the orphans are inserted causing them to be deleted too early.
The test should use _waitForDelete in the moveChunk call. We should also review all of the related range deletion tests to see if this fix is needed there as well.