From 00909a4262671c685dc4f5f004746d39fdcf29ad Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 25 Nov 2011 23:03:24 +0100 Subject: qdeclarativedebugclient: Fix flaky autotest The connectToHost() call can try to establish the connection directly (synchronously), in which case the warning message will be output before the subsequent ignoreMessage() call, causing the test to fail. Change-Id: I08a6a7d4d090cbb942c348e0787b586c71318f99 Reviewed-by: Aurindam Jana --- .../debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 46a711ae78..343399b690 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/debugger/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -148,9 +148,9 @@ void tst_QDeclarativeDebugClient::parallelConnect() { QDeclarativeDebugConnection connection2; - connection2.connectToHost("127.0.0.1", PORT); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Another client is already connected"); // will connect & immediately disconnect + connection2.connectToHost("127.0.0.1", PORT); QVERIFY(connection2.waitForConnected()); QTRY_COMPARE(connection2.state(), QAbstractSocket::UnconnectedState); QVERIFY(m_conn->isConnected()); -- cgit v1.2.3