Added a more robust timeout test.