make tests more timing robust