fixed test not closing connection