In the second subtest of rts10 (the "_prepare" one), adding time.sleep(50) to the finally block before shutting down the background checkpointer thread makes the hs_sweep > 0 assertion fail for all storage types.
Tests shouldn't be timing-dependent.
The reason seems to be that for each row whose history-store page gets into the checkpoint written by the background checkpointer, if the data-store page also gets into the checkpoint, the history store entries are cleaned up by the data-store RTS and counted in hs_remove, and then are not in the history store for the history store pass to clean up and count in hs_sweep.
The proper solution seems to be to assert about the sum of hs_remove and hs_sweep rather than about each of them separately. Patch coming in a moment.