tst_QDBusXmlParser: make XML attribute order deterministic

Avoid QHash randomization so that the order of the XML attributes is stable
This was causing intermittent failures.

Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
(cherry picked from commit aa434bc90861f1599209edd6bc614802c50704dc)
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
This commit is contained in:
David Faure 2012-12-14 10:42:08 +01:00 committed by The Qt Project
parent 3a75e2f227
commit c8b1c9dcea

View File

@ -58,6 +58,7 @@ private:
QString clean_xml(const QString&);
private slots:
void initTestCase();
void parsing_data();
void parsing();
void parsingWithDoctype_data();
@ -71,6 +72,12 @@ private slots:
void properties();
};
void tst_QDBusXmlParser::initTestCase()
{
// Avoid QHash randomization so that the order of the XML attributes is stable
qputenv("QT_HASH_SEED", "123");
}
void tst_QDBusXmlParser::parsing_data()
{
QTest::addColumn<QString>("xmlData");