Test flakiness - Moving the first request into a retry block

Sometimes the first request to the application results in exceptions like 'No connection could be made because the target machine actively refused it'. Adding a retry to mitigate that.