From 695a0e1b6ba8ec78219dce994949ded7c2b1caa5 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Wed, 13 Feb 2019 00:10:30 +0100 Subject: [PATCH] Make test better --- tests/sendfiletest.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/sendfiletest.cpp b/tests/sendfiletest.cpp index f95265b3a..fcb2caf46 100644 --- a/tests/sendfiletest.cpp +++ b/tests/sendfiletest.cpp @@ -126,13 +126,15 @@ class TestSendFile : public QObject ft->start(); - QVERIFY(spyTransfer.count() || spyTransfer.wait(1000000000)); + QVERIFY(spyTransfer.count() || spyTransfer.wait()); - if (ft->error()) qWarning() << "fterror" << ft->errorString(); + if (ft->error()) { + qWarning() << "fterror" << ft->errorString(); + } QCOMPARE(ft->error(), 0); - // HACK | FIXME: Why does this break the test? - //QCOMPARE(spyUpload.count(), 1); + + QCOMPARE(spyUpload.count(), 1); QFile resultFile(destFile), originFile(aFile); QVERIFY(resultFile.open(QIODevice::ReadOnly));