fix unit test problem:close connection after test.