From f9858ee2f51095e84602156a29d9d9a57a607045 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Feb 2018 16:38:31 +0100 Subject: Fix race condition in tst_QWebEngineDownloads::downloadTwoLinks() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accept the two requests might come out of order Change-Id: I313506d975ebf007fce3cd857baa742866b8f38b Reviewed-by: Michael BrĂ¼ning --- tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp index 606fe5b12..79a5aa2dc 100644 --- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp +++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp @@ -472,11 +472,16 @@ void tst_QWebEngineDownloads::downloadTwoLinks() std::unique_ptr file1RR(results.takeFirst()); QVERIFY(file1RR); QCOMPARE(file1RR->requestMethod(), QByteArrayLiteral("GET")); - QCOMPARE(file1RR->requestPath(), QByteArrayLiteral("/file1")); QTRY_COMPARE(requestSpy.count(), 4); std::unique_ptr file2RR(results.takeFirst()); QVERIFY(file2RR); QCOMPARE(file2RR->requestMethod(), QByteArrayLiteral("GET")); + + // Handle one request overtaking the other + if (file1RR->requestPath() == QByteArrayLiteral("/file2")) + std::swap(file1RR, file2RR); + + QCOMPARE(file1RR->requestPath(), QByteArrayLiteral("/file1")); QCOMPARE(file2RR->requestPath(), QByteArrayLiteral("/file2")); file1RR->setResponseHeader(QByteArrayLiteral("content-type"), QByteArrayLiteral("text/plain")); -- cgit v1.2.3 From 9dc8dff7a8f4d58f71d816375d49f8829f06aae5 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 8 Feb 2018 11:14:08 +0100 Subject: Blacklist flaky qwebenginedownloads test This test suffers for out of order handling of network requests. To speed up release blacklist flaky tests. Change-Id: Ifafc4f429b7a2bb8cd4b5c786143b689657cc753 Reviewed-by: Allan Sandfeld Jensen --- tests/auto/widgets/qwebenginedownloads/BLACKLIST | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/auto/widgets/qwebenginedownloads/BLACKLIST (limited to 'tests') diff --git a/tests/auto/widgets/qwebenginedownloads/BLACKLIST b/tests/auto/widgets/qwebenginedownloads/BLACKLIST new file mode 100644 index 000000000..f8a97e9e8 --- /dev/null +++ b/tests/auto/widgets/qwebenginedownloads/BLACKLIST @@ -0,0 +1,4 @@ +[downloadLink] +* +[downloadTwoLinks] +* -- cgit v1.2.3