Timeout changed to custom exception and fixed test.