diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-05-28 13:36:51 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-08-07 09:58:04 -0500 |
commit | f0fcf45bd1f9b32866f55b844dfc9482b31d2560 (patch) | |
tree | aa77aabfd12d3838d17bc06fd6a32b6407059ed1 /user/qca/test.patch | |
parent | f56ec0f591381c50d35940a4c3a6af71b93dbca4 (diff) | |
download | packages-f0fcf45bd1f9b32866f55b844dfc9482b31d2560.tar.gz packages-f0fcf45bd1f9b32866f55b844dfc9482b31d2560.tar.bz2 packages-f0fcf45bd1f9b32866f55b844dfc9482b31d2560.tar.xz packages-f0fcf45bd1f9b32866f55b844dfc9482b31d2560.zip |
user/qca: Update for GCC 11+
Diffstat (limited to 'user/qca/test.patch')
-rw-r--r-- | user/qca/test.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/user/qca/test.patch b/user/qca/test.patch new file mode 100644 index 000000000..6b9fb12ef --- /dev/null +++ b/user/qca/test.patch @@ -0,0 +1,77 @@ +From b9d914bb3b5b0ecf8568adf1b4610d4da2cde244 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt <fabian@ritter-vogt.de> +Date: Wed, 15 Sep 2021 10:34:08 +0200 +Subject: [PATCH] Make filewatchunittest much quicker + +Use QSignalSpy::wait to avoid waiting needlessly. +Reduce time to wait for (expected and unexpected) signals to 2s. +--- + .../filewatchunittest/filewatchunittest.cpp | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/unittest/filewatchunittest/filewatchunittest.cpp b/unittest/filewatchunittest/filewatchunittest.cpp +index d1bc117c..63baa655 100644 +--- a/unittest/filewatchunittest/filewatchunittest.cpp ++++ b/unittest/filewatchunittest/filewatchunittest.cpp +@@ -40,7 +40,7 @@ void FileWatchUnitTest::cleanupTestCase() + + void FileWatchUnitTest::filewatchTest() + { +- QWARN("Unittest will take about 1 minute. Please wait."); ++ QWARN("Unittest will take about 10 seconds. Please wait."); + + QCA::FileWatch watcher; + QCOMPARE( watcher.fileName(), QString() ); +@@ -55,41 +55,40 @@ void FileWatchUnitTest::filewatchTest() + + watcher.setFileName( tempFile->fileName() ); + QCOMPARE( watcher.fileName(), tempFile->fileName() ); +- QTest::qWait(7000); ++ QVERIFY(!spy.wait(2000)); + QCOMPARE( spy.count(), 0 ); + tempFile->close(); +- QTest::qWait(7000); ++ QVERIFY(!spy.wait(2000)); + QCOMPARE( spy.count(), 0 ); + + tempFile->open(); + tempFile->write("foo"); + tempFile->flush(); +- QTest::qWait(7000); ++ QVERIFY(spy.wait(2000)); + QCOMPARE( spy.count(), 1 ); + + tempFile->close(); +- QTest::qWait(7000); +- ++ QVERIFY(!spy.wait(2000)); + QCOMPARE( spy.count(), 1 ); + + tempFile->open(); + tempFile->write("foo"); + tempFile->flush(); +- QTest::qWait(7000); ++ QVERIFY(spy.wait(2000)); + QCOMPARE( spy.count(), 2 ); + + tempFile->write("bar"); + tempFile->flush(); +- QTest::qWait(7000); ++ QVERIFY(spy.wait(2000)); + QCOMPARE( spy.count(), 3 ); + + tempFile->close(); +- QTest::qWait(7000); ++ QVERIFY(!spy.wait(2000)); + + QCOMPARE( spy.count(), 3 ); + + delete tempFile; +- QTest::qWait(7000); ++ QVERIFY(spy.wait(2000)); + QCOMPARE( spy.count(), 4 ); + } + +-- +GitLab + |