diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-07-07 16:00:43 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-20 00:22:07 +0200 |
commit | bfc5bb09c4b79c17e1d846f6c46611d83cc7de4a (patch) | |
tree | 2b7425be3d51822aef08b909dc9459ad851952ce /tests/auto/network/socket | |
parent | 674e79416fefe7b5acf2a8c18d3c91d8feddcc18 (diff) |
Ignore or suppress warning and debug messages in tst_QLocalSocket
The one in tst_QLocalSocket::writeToClientAndDisconnect just needed
proper ordering: that's what waitForDisconnect is for. At the same time,
we need to make sure we get the same message from all three
implementations of QLocalSocket::waitForDisconnect (and without the
useless space at the end).
Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'tests/auto/network/socket')
-rw-r--r-- | tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index 7065f5be36..9887acf7dd 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -270,6 +270,7 @@ void tst_QLocalSocket::socket_basic() //QCOMPARE(socket.socketDescriptor(), (qintptr)-1); QCOMPARE(socket.state(), QLocalSocket::UnconnectedState); QCOMPARE(socket.waitForConnected(0), false); + QTest::ignoreMessage(QtWarningMsg, "QLocalSocket::waitForDisconnected() is not allowed in UnconnectedState"); QCOMPARE(socket.waitForDisconnected(0), false); QCOMPARE(socket.waitForReadyRead(0), false); @@ -313,6 +314,7 @@ void tst_QLocalSocket::listen() QVERIFY(server.errorString().isEmpty()); QCOMPARE(server.serverError(), QAbstractSocket::UnknownSocketError); // already isListening + QTest::ignoreMessage(QtWarningMsg, "QLocalServer::listen() called when already listening"); QVERIFY(!server.listen(name)); } else { QVERIFY(!server.errorString().isEmpty()); @@ -1015,15 +1017,16 @@ void tst_QLocalSocket::writeToClientAndDisconnect() clientSocket->close(); server.close(); - QTRY_COMPARE(readChannelFinishedSpy.count(), 1); - QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); client.waitForDisconnected(); + QCOMPARE(readChannelFinishedSpy.count(), 1); + QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); QCOMPARE(client.state(), QLocalSocket::UnconnectedState); } void tst_QLocalSocket::debug() { // Make sure this compiles + QTest::ignoreMessage(QtDebugMsg, "QLocalSocket::ConnectionRefusedError QLocalSocket::UnconnectedState "); qDebug() << QLocalSocket::ConnectionRefusedError << QLocalSocket::UnconnectedState; } @@ -1155,7 +1158,7 @@ void tst_QLocalSocket::verifyListenWithDescriptor() QFETCH(bool, abstract); QFETCH(bool, bound); - qDebug() << "socket" << path << abstract; +// qDebug() << "socket" << path << abstract; int listenSocket; |