add test cases for reconnect