aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGlenn Watson <glenn.watson@nokia.com>2012-06-28 11:11:05 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-02 00:08:23 +0200
commitdf8a18476a7e402694ad669e500b1e10e020dd73 (patch)
treedad14a81489ca5b4c01ebca9e9acd10ab6c50274 /tests
parentb177bc47efefed3cb1c321a3e2d2bbb2e58351cd (diff)
Work around test failure for pixmap cache.
A deadlock condition can occur in the qtbase network management code. Added a work around for the bug, and marked the test as significant for CI on Ubuntu 10.04 LTS. Task-number: QTBUG-25307 Change-Id: I6c11645d29dfd34b564f0a811c6f3470b8f31312 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro2
-rw-r--r--tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro
index 03d7eef66a..185eb2c213 100644
--- a/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro
+++ b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro
@@ -14,6 +14,4 @@ TESTDATA = data/*
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = lucid ]"):CONFIG += insignificant_test # QTBUG-25307
-
QT += core-private gui-private qml-private quick-private network testlib concurrent
diff --git a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
index 8d2eb66e08..fb2405c27a 100644
--- a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
+++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
@@ -46,6 +46,7 @@
#include <QNetworkReply>
#include "../../shared/util.h"
#include "testhttpserver.h"
+#include <QtNetwork/QNetworkConfigurationManager>
#ifndef QT_NO_CONCURRENT
#include <qtconcurrentrun.h>
@@ -110,10 +111,17 @@ static const bool localfile_optimized = true;
static const bool localfile_optimized = false;
#endif
-
void tst_qquickpixmapcache::initTestCase()
{
QQmlDataTest::initTestCase();
+
+ // This avoids a race condition/deadlock bug in network config
+ // manager when it is accessed by the HTTP server thread before
+ // anything else. Bug report can be found at:
+ // https://bugreports.qt-project.org/browse/QTBUG-26355
+ QNetworkConfigurationManager cm;
+ cm.updateConfigurations();
+
server.serveDirectory(testFile("http"));
}
@@ -274,7 +282,7 @@ void tst_qquickpixmapcache::parallel()
if (i == cancel) {
QVERIFY(!getters[i]->gotslot);
} else {
- if (pending[i])
+ if (pending[i])
QVERIFY(getters[i]->gotslot);
QVERIFY(pixmap->isReady());