summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-03-22 18:06:01 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-04-13 01:36:06 +0200
commitc68f8db62b3492074a73e754d4668c2d693cdafa (patch)
tree7d0745947604684855c4bb03fcd3e88deed1f66c /tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
parent223b92490edfd4e3e75e634831258c54d5b0a501 (diff)
Tests: make some QFile::open calls fail
In some cases calls to QFile::open are made outside of a testfunction (so we can't use QVERIFY), or even in standalone executables that are executed by tests. Make them fail "visibly". Change-Id: Iec4d56f6d874be16aa2e9ad6974eeec2a98caa3f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 5a6fe9f6ae..a4a05b18f5 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -5088,6 +5088,10 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
QByteArray contents = file.readAll();
QCOMPARE(contents, data);
+ if (process.state() == QProcess::Running)
+ QVERIFY(process.waitForFinished());
+ QCOMPARE(process.exitCode(), 0);
+
#endif // QT_CONFIG(process)
}