Stabilize tst_QUdpSocket::broadcasting

Sending 100*8 packets of each type of message is WAY overkill. That's a
stress test without limiting. My Linux system starts reporting EAGAIN on
the socket, so reduce the amount of data sent.

Change-Id: I153f44cf3b91d37526dac580b400114cc80b1769
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Thiago Macieira 2014-12-23 13:10:27 -02:00
parent 68d8d27fad
commit e38631b5e9

View File

@ -308,7 +308,7 @@ void tst_QUdpSocket::broadcasting()
#endif #endif
broadcastSocket.bind(QHostAddress(QHostAddress::AnyIPv4), 0); broadcastSocket.bind(QHostAddress(QHostAddress::AnyIPv4), 0);
for (int j = 0; j < 100; ++j) { for (int j = 0; j < 10; ++j) {
for (int k = 0; k < 4; k++) { for (int k = 0; k < 4; k++) {
broadcastSocket.writeDatagram(message[i], strlen(message[i]), broadcastSocket.writeDatagram(message[i], strlen(message[i]),
QHostAddress::Broadcast, 5000); QHostAddress::Broadcast, 5000);