diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-23 07:49:33 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-02-23 10:19:34 +0000 |
commit | 19a9768f1a62366f1bee16a7cb9b3256ef851efe (patch) | |
tree | 9d41df69dd52b5f49ae008c9eaf1aca9f53e1e55 /tests | |
parent | bdf1c4f671c706832cea84269e91995e85eb9f07 (diff) | |
parent | 2a1292b9168d40e71c9e67a41d3b8c499b8e222b (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev
Diffstat (limited to 'tests')
10 files changed, 45 insertions, 14 deletions
diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp index 1f9ffb8985..6e2220fa67 100644 --- a/tests/auto/network/access/http2/http2srv.cpp +++ b/tests/auto/network/access/http2/http2srv.cpp @@ -431,6 +431,13 @@ void Http2Server::readReady() if (connectionError) return; + if (redirectSent) { + // We are a "single shot" server, working in 'h2' mode, + // responding with a redirect code. Don't bother to handle + // anything else now. + return; + } + if (upgradeProtocol) { handleProtocolUpgrade(); } else if (waitingClientPreface) { @@ -800,6 +807,13 @@ void Http2Server::sendResponse(quint32 streamID, bool emptyBody) HttpHeader header; if (redirectWhileReading) { + if (redirectSent) { + // This is a "single-shot" server responding with a redirect code. + return; + } + + redirectSent = true; + qDebug("server received HEADERS frame (followed by DATA frames), redirecting ..."); Q_ASSERT(targetPort); header.push_back({":status", "308"}); diff --git a/tests/auto/network/access/http2/http2srv.h b/tests/auto/network/access/http2/http2srv.h index 87a17ced8b..ae3f084fdc 100644 --- a/tests/auto/network/access/http2/http2srv.h +++ b/tests/auto/network/access/http2/http2srv.h @@ -193,6 +193,7 @@ private: // Redirect, with status code 308, as soon as we've seen headers, while client // may still be sending DATA frames. See tst_Http2::earlyResponse(). bool redirectWhileReading = false; + bool redirectSent = false; quint16 targetPort = 0; QAtomicInt interrupted; protected slots: diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index bbb314128b..02c5e51cbe 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -474,7 +474,7 @@ void tst_Http2::earlyResponse() runEventLoop(); QVERIFY(serverPort); - sendRequest(1, QNetworkRequest::NormalPriority, {10000000, Qt::Uninitialized}); + sendRequest(1, QNetworkRequest::NormalPriority, {1000000, Qt::Uninitialized}); runEventLoop(); diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index 8ebb27e58c..707c1acf48 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -1640,15 +1640,14 @@ void tst_QUdpSocket::linkLocalIPv6() sockets << s; } - QUdpSocket neutral; - QVERIFY(neutral.bind(QHostAddress(QHostAddress::AnyIPv6))); - QSignalSpy neutralReadSpy(&neutral, SIGNAL(readyRead())); - QByteArray testData("hello"); foreach (QUdpSocket *s, sockets) { + QUdpSocket neutral; + QVERIFY(neutral.bind(QHostAddress(QHostAddress::AnyIPv6))); + QSignalSpy neutralReadSpy(&neutral, SIGNAL(readyRead())); + QSignalSpy spy(s, SIGNAL(readyRead())); - neutralReadSpy.clear(); QVERIFY(s->writeDatagram(testData, s->localAddress(), neutral.localPort())); QTRY_VERIFY(neutralReadSpy.count() > 0); //note may need to accept a firewall prompt diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 892c743dbf..f309231b10 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -913,7 +913,7 @@ void tst_QSqlDatabase::recordMySQL() FieldDef("date", QVariant::Date, QDate::currentDate()), FieldDef("datetime", QVariant::DateTime, dt), FieldDef("timestamp", QVariant::DateTime, dt, false), - FieldDef("time", QVariant::Time, dt.time()), + FieldDef("time", QVariant::String, dt.time()), FieldDef("year", QVariant::Int, 2003), FieldDef("char(20)", QVariant::String, "Blah"), FieldDef("varchar(20)", QVariant::String, "BlahBlah"), diff --git a/tests/auto/sql/models/models.pro b/tests/auto/sql/models/models.pro index 2c3ae4ef0a..da807f4351 100644 --- a/tests/auto/sql/models/models.pro +++ b/tests/auto/sql/models/models.pro @@ -1,8 +1,8 @@ TEMPLATE=subdirs -SUBDIRS=\ +qtHaveModule(widgets): SUBDIRS = \ qsqlquerymodel \ - qsqlrelationaltablemodel \ + qsqlrelationaldelegate + +SUBDIRS += qsqlrelationaltablemodel \ qsqltablemodel \ -!qtHaveModule(widgets): SUBDIRS -= \ - qsqlquerymodel diff --git a/tests/auto/sql/models/qsqlrelationaldelegate/tst_qsqlrelationaldelegate.cpp b/tests/auto/sql/models/qsqlrelationaldelegate/tst_qsqlrelationaldelegate.cpp index 36f592395e..a7089c06a1 100644 --- a/tests/auto/sql/models/qsqlrelationaldelegate/tst_qsqlrelationaldelegate.cpp +++ b/tests/auto/sql/models/qsqlrelationaldelegate/tst_qsqlrelationaldelegate.cpp @@ -158,12 +158,13 @@ void tst_QSqlRelationalDelegate::comboBoxEditor() QTest::keyClick(editor, Qt::Key_Down); QTest::keyClick(editor, Qt::Key_Enter); QCOMPARE(editor->currentText(), "mister"); + QTest::keyClick(tv.viewport(), Qt::Key_Tab); QVERIFY_SQL(model, submitAll()); QSqlQuery qry(db); QVERIFY_SQL(qry, exec("SELECT title_key FROM " + reltest1 + " WHERE id=1")); QVERIFY(qry.next()); - QCOMPARE(qry.value(0).toString(), "mister"); + QCOMPARE(qry.value(0).toString(), "2"); } QTEST_MAIN(tst_QSqlRelationalDelegate) diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST b/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST new file mode 100644 index 0000000000..01679eb6ee --- /dev/null +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST @@ -0,0 +1,11 @@ +winrt +[sort:QFileDialog usage] +ubuntu +b2qt +[specialFiles] +ubuntu +b2qt +[dirsBeforeFiles] +ubuntu +b2qt +windows diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro index bc4671f60c..db8cf7de3f 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro @@ -1,3 +1,6 @@ +INCLUDEPATH += ../../../../shared +HEADERS += ../../../../shared/emulationdetector.h + CONFIG += testcase # This testcase can be slow on Windows and OS X, and may interfere with other file system tests. win32:testcase.timeout = 900 @@ -8,5 +11,3 @@ QT += core-private testlib SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel - -CONFIG += insignificant_test # QTBUG-29403 diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 9ee5292fcb..665a116a3a 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -27,6 +27,7 @@ ****************************************************************************/ +#include <emulationdetector.h> #include <QtTest/QtTest> #ifdef QT_BUILD_INTERNAL #include <private/qfilesystemmodel_p.h> @@ -788,6 +789,9 @@ void tst_QFileSystemModel::sort() MyFriendFileSystemModel *myModel = new MyFriendFileSystemModel(); QTreeView *tree = new QTreeView(); + if (fileDialogMode && EmulationDetector::isRunningArmOnX86()) + QSKIP("Crashes in QEMU. QTBUG-70572"); + #ifdef QT_BUILD_INTERNAL if (fileDialogMode) myModel->d_func()->disableRecursiveSort = true; |