[misc] Make test less fragile