summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-06-11 17:04:38 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-06-11 17:43:00 +0000
commit2420ae95b2e00f5b4aa605fa968152873e91b505 (patch)
tree6334f9a005b817af066a0dab42a5b00741ab8ecb
parenta5cb3b8ff10fcf1def8bde6f814582be1c19b83b (diff)
downloadqtwebsockets-2420ae95b2e00f5b4aa605fa968152873e91b505.tar.gz
Add missing check for socket connection in test
In a5cb3b8ff10fcf1def8bde6f814582be1c19b83b I made the tst_openRequest less reliable because the socketConnectedSpy is no longer checked. Change-Id: Id721fa4aa203eeb85a5fce85a5270bc14cc37ab1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
-rw-r--r--tests/auto/qwebsocket/tst_qwebsocket.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qwebsocket/tst_qwebsocket.cpp b/tests/auto/qwebsocket/tst_qwebsocket.cpp
index cb4b6bf..f993f84 100644
--- a/tests/auto/qwebsocket/tst_qwebsocket.cpp
+++ b/tests/auto/qwebsocket/tst_qwebsocket.cpp
@@ -593,6 +593,7 @@ void tst_QWebSocket::tst_openRequest()
req.setRawHeader("X-Custom-Header", "A custom header");
socket.open(req);
+ QTRY_COMPARE(socketConnectedSpy.count(), 1);
QTRY_COMPARE(serverRequestSpy.count(), 1);
QCOMPARE(socket.state(), QAbstractSocket::ConnectedState);
QList<QVariant> arguments = serverRequestSpy.takeFirst();