close method for connection
connection tests