Add tests for timeout feature of the connection