Small refactoring for timeouts tests