close client on test