Add a timeout to prevent failing inifite loop tests from hanging forever