From b345087ddee39679223147e1da8f1240fb3bc8b9 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 16 Mar 2020 21:37:25 +0100 Subject: Log the possible socket error code for the flaky test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tst_QSocks5SocketEngine::simpleConnectToIMAP() is flaky. It may be useful to log the socket error, to provide more info in case the test fails again. Change-Id: Ia5518dce13fd9da1fa5bfb3d5cf3a52a908b8698 Reviewed-by: Timur Pocheptsov Reviewed-by: MÃ¥rten Nordheim --- .../auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp index 85eec6e783..009c5b7240 100644 --- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -309,7 +309,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() QCOMPARE(socketDevice.peerAddress(), QtNetworkSettings::imapServerIp()); // Wait for the greeting - QVERIFY(socketDevice.waitForRead()); + QVERIFY2(socketDevice.waitForRead(), qPrintable("Socket error:" + socketDevice.errorString())); // Read the greeting qint64 available = socketDevice.bytesAvailable(); -- cgit v1.2.3