Open johnzhanghua opened 8 years ago
@johnzhanghua thanks for the contribution! looks like the test is failing though
@mbroadst sorry about the typo, as I use different host, username/password in my test case, just change it to your settings before delivery.
@johnzhanghua great, thanks. Now a final question: is it possible to run this test in less than 5min? That's going to take a somewhat serious toll on continuous integration 😄
@mbroadst , agree it is not a good test case. I might disable the test as you did for the autoReconnect one.
@johnzhanghua I haven't played with the code at all, but it seems like the issue could probably be triggered without having to wait as long. It looks like a test that should indeed be included, but if you don't have much time then I think it might be better moved to a manual
test
In the test case networkDownThenUp(). If an network is down and up again, the retry of the connection will get the error "QAbstractSocket::connectToHost() called when already looking up or connecting/connected to xxxx". This will cause the reconnect fail.
Just simply add the socket->abort() after the _q_disconnect will fix the issue.