From 30d5d6456c28805dfa9a1f3a1266814a5c660f01 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sat, 1 Jun 2024 21:28:08 +0200 Subject: [PATCH] Log free space and an explanatory message. Fixes #971 --- tests/shared/src/FileCacheTests.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/shared/src/FileCacheTests.cpp b/tests/shared/src/FileCacheTests.cpp index b7c2103817..d90e01d590 100644 --- a/tests/shared/src/FileCacheTests.cpp +++ b/tests/shared/src/FileCacheTests.cpp @@ -132,6 +132,11 @@ void FileCacheTests::testFreeSpacePreservation() { cache->setMinFreeSize(targetFreeSpace); QCOMPARE(cache->getNumCachedFiles(), (size_t)5); QCOMPARE(cache->getNumTotalFiles(), (size_t)5); + qDebug() << "Free space: " << getFreeSpace(); + qDebug() << "Target : " << targetFreeSpace; + + qInfo() << "The following test may fail if free disk space was changed by another program during the test's runtime"; + QVERIFY(getFreeSpace() >= targetFreeSpace); for (int i = 0; i < 95; ++i) { std::string key = getFileKey(i);