From 81a88639acf8e7dfe4312733635c138abe51b828 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 28 Nov 2017 14:59:12 -0800 Subject: [PATCH] tst_QUdpSocket: fix linkLocalIPv4 test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I broke it in commit 4da2dda2aa1f710177157dc1cf841e0bf0b9d829. It wasn't flaky or anything: it was plain broken and would never pass. That indicates no node in the CI has an IPv4 link-local address (and apparently neither did I at the time). Change-Id: Ifb5969bf206e4cd7b14efffd14fb62176546916e Reviewed-by: Edward Welbourne Reviewed-by: MÃ¥rten Nordheim --- tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index aa71f7e94d..5c5dfc881d 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -1723,7 +1723,7 @@ void tst_QUdpSocket::linkLocalIPv4() foreach (QNetworkAddressEntry addr, iface.addressEntries()) { if (addr.ip().isInSubnet(localMask, 16)) { addresses << addr.ip(); - qDebug() << addr.ip(); + qDebug() << "Found IPv4 link local address" << addr.ip(); } } } @@ -1748,7 +1748,6 @@ void tst_QUdpSocket::linkLocalIPv4() QVERIFY(s->writeDatagram(testData, s->localAddress(), neutral.localPort())); QVERIFY2(neutral.waitForReadyRead(10000), QtNetworkSettings::msgSocketError(neutral).constData()); - QVERIFY2(s->waitForReadyRead(10000), QtNetworkSettings::msgSocketError(*s).constData()); QNetworkDatagram dgram = neutral.receiveDatagram(testData.length() * 2); QVERIFY(dgram.isValid()); QCOMPARE(dgram.senderAddress(), s->localAddress()); @@ -1771,7 +1770,7 @@ void tst_QUdpSocket::linkLocalIPv4() } QVERIFY(neutral.writeDatagram(dgram.makeReply(testData))); - + QVERIFY2(s->waitForReadyRead(10000), QtNetworkSettings::msgSocketError(*s).constData()); dgram = s->receiveDatagram(testData.length() * 2); QVERIFY(dgram.isValid()); QCOMPARE(dgram.data(), testData);