trq-2138 unlock the job before doing a svr_connect in case the call hangs. Also added unit test for function.