There was a race condition in the test where the server connection sometimes closed before the final client opereation. This triggered an unwrap in the test. This patch updates the test to ensuree that the mock server connection stays open until the client test is complete.