Start a few queries before testing to disconnect
This commit is contained in:
parent
6010bf72c9
commit
db65957154
|
@ -626,9 +626,15 @@ void ConnectionTests::testRequestingQrCode()
|
|||
|
||||
void ConnectionTests::testDisconnecting()
|
||||
{
|
||||
cerr << "\n - Disconnecting ..." << endl;
|
||||
cerr << "\n - Disconnecting while there are outstanding requests ..." << endl;
|
||||
waitForConnected();
|
||||
waitForConnection(defaultDisconnect(), 5000, connectionSignal(&SyncthingConnection::statusChanged));
|
||||
m_connection.requestVersion();
|
||||
m_connection.requestDirStatistics();
|
||||
waitForSignals([this] {
|
||||
m_connection.requestDeviceStatistics();
|
||||
m_connection.requestCompletion("MMGUI6U-WUEZQCP-XZZ6VYB-LCT4TVC-ER2HAVX-QYT6X7D-S6ZSG2B-323KLQ7", "test1");
|
||||
QTimer::singleShot(0, &m_connection, defaultDisconnect());
|
||||
}, 5000, connectionSignal(&SyncthingConnection::statusChanged));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("disconnected", QStringLiteral("disconnected"), m_connection.statusText());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue