Better retry handling for server test