From 737fe7e00d6227b940f91a4d120f96964eedcd5b Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 6 Jul 2014 22:35:55 +0200 Subject: [PATCH] randomize other test ports too --- tests/auto/guhtestbase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/guhtestbase.cpp b/tests/auto/guhtestbase.cpp index 7db34b43..c274d310 100644 --- a/tests/auto/guhtestbase.cpp +++ b/tests/auto/guhtestbase.cpp @@ -34,8 +34,9 @@ GuhTestBase::GuhTestBase(QObject *parent) : QObject(parent), m_commandId(0) { - m_mockDevice1Port = 1337; - m_mockDevice2Port = 7331; + qsrand(QDateTime::currentMSecsSinceEpoch()); + m_mockDevice1Port = 1337 + (qrand() % 1000); + m_mockDevice2Port = 7331 + (qrand() % 1000); QCoreApplication::instance()->setOrganizationName("guh-test"); m_rulesSettings = QCoreApplication::instance()->organizationName() + "/rules";