The test occasionally fails on got_loading_error = False on the slow qemu machines. There are only 3 ways this can fail: a timeout occured, an unhandled JSONRPCError is raised, or the race didn't happen.
The later case should be rare enough that it never happens, intended that the tests runs the RPCs enough times
This is where this becomes problematic, as we have a timeout that doesn't scale with the RPC duration. This diff fixes that by ensuring that each of the 2 RPCs in test_load_unload can run 10x at timeout duration. That will also fixes the first case as RPC timeout can be greater than the thread timeout without this diff.
Depends on D12215.