diff options
-rw-r--r-- | examples/imapresource/tests/imapmailsyncbenchmark.cpp | 7 | ||||
-rw-r--r-- | examples/mailtransportresource/tests/mailtransporttest.cpp | 5 | ||||
-rw-r--r-- | tests/dummyresourcebenchmark.cpp | 10 | ||||
-rw-r--r-- | tests/dummyresourcetest.cpp | 2 | ||||
-rw-r--r-- | tests/inspectiontest.cpp | 3 | ||||
-rw-r--r-- | tests/mailsynctest.cpp | 7 | ||||
-rw-r--r-- | tests/mailtest.cpp | 3 | ||||
-rw-r--r-- | tests/mailthreadtest.cpp | 4 | ||||
-rw-r--r-- | tests/modelinteractivitytest.cpp | 4 |
9 files changed, 15 insertions, 30 deletions
diff --git a/examples/imapresource/tests/imapmailsyncbenchmark.cpp b/examples/imapresource/tests/imapmailsyncbenchmark.cpp index 824b769..a53c148 100644 --- a/examples/imapresource/tests/imapmailsyncbenchmark.cpp +++ b/examples/imapresource/tests/imapmailsyncbenchmark.cpp | |||
@@ -90,17 +90,12 @@ private slots: | |||
90 | 90 | ||
91 | void cleanup() | 91 | void cleanup() |
92 | { | 92 | { |
93 | //TODO the shutdown job fails if the resource is already shut down | 93 | VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); |
94 | // VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); | ||
95 | ResourceControl::shutdown(mResourceInstanceIdentifier).exec().waitForFinished(); | ||
96 | removeResourceFromDisk(mResourceInstanceIdentifier); | 94 | removeResourceFromDisk(mResourceInstanceIdentifier); |
97 | } | 95 | } |
98 | 96 | ||
99 | void init() | 97 | void init() |
100 | { | 98 | { |
101 | qDebug(); | ||
102 | qDebug() << "-----------------------------------------"; | ||
103 | qDebug(); | ||
104 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); | 99 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); |
105 | } | 100 | } |
106 | 101 | ||
diff --git a/examples/mailtransportresource/tests/mailtransporttest.cpp b/examples/mailtransportresource/tests/mailtransporttest.cpp index e44aa23..410e17b 100644 --- a/examples/mailtransportresource/tests/mailtransporttest.cpp +++ b/examples/mailtransportresource/tests/mailtransporttest.cpp | |||
@@ -41,13 +41,12 @@ private slots: | |||
41 | 41 | ||
42 | void cleanup() | 42 | void cleanup() |
43 | { | 43 | { |
44 | // VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); | 44 | VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); |
45 | // removeResourceFromDisk(mResourceInstanceIdentifier); | ||
46 | } | 45 | } |
47 | 46 | ||
48 | void init() | 47 | void init() |
49 | { | 48 | { |
50 | // VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); | 49 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); |
51 | } | 50 | } |
52 | 51 | ||
53 | void testSendMail() | 52 | void testSendMail() |
diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index 8c6afb4..d0ecef7 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp | |||
@@ -50,7 +50,7 @@ private slots: | |||
50 | void testCommandResponsiveness() | 50 | void testCommandResponsiveness() |
51 | { | 51 | { |
52 | // Test responsiveness including starting the process. | 52 | // Test responsiveness including starting the process. |
53 | Sink::Store::removeDataFromDisk("sink.dummy.instance1").exec().waitForFinished(); | 53 | VERIFYEXEC(Sink::Store::removeDataFromDisk("sink.dummy.instance1")); |
54 | 54 | ||
55 | QTime time; | 55 | QTime time; |
56 | time.start(); | 56 | time.start(); |
@@ -76,13 +76,13 @@ private slots: | |||
76 | QTRY_VERIFY(gotNotification); | 76 | QTRY_VERIFY(gotNotification); |
77 | 77 | ||
78 | QVERIFY2(duration < 100, QString::fromLatin1("Processing a create command took more than 100ms: %1").arg(duration).toLatin1()); | 78 | QVERIFY2(duration < 100, QString::fromLatin1("Processing a create command took more than 100ms: %1").arg(duration).toLatin1()); |
79 | Sink::ResourceControl::shutdown("sink.dummy.instance1").exec().waitForFinished(); | 79 | VERIFYEXEC(Sink::ResourceControl::shutdown("sink.dummy.instance1")); |
80 | qDebug() << "Single command took [ms]: " << duration; | 80 | qDebug() << "Single command took [ms]: " << duration; |
81 | } | 81 | } |
82 | 82 | ||
83 | void testWriteToFacade() | 83 | void testWriteToFacade() |
84 | { | 84 | { |
85 | Sink::Store::removeDataFromDisk("sink.dummy.instance1").exec().waitForFinished(); | 85 | VERIFYEXEC(Sink::Store::removeDataFromDisk("sink.dummy.instance1")); |
86 | 86 | ||
87 | QTime time; | 87 | QTime time; |
88 | time.start(); | 88 | time.start(); |
@@ -147,7 +147,7 @@ private slots: | |||
147 | 147 | ||
148 | void testWriteInProcess() | 148 | void testWriteInProcess() |
149 | { | 149 | { |
150 | Sink::Store::removeDataFromDisk("sink.dummy.instance1").exec().waitForFinished(); | 150 | VERIFYEXEC(Sink::Store::removeDataFromDisk("sink.dummy.instance1")); |
151 | QTime time; | 151 | QTime time; |
152 | time.start(); | 152 | time.start(); |
153 | 153 | ||
@@ -235,7 +235,7 @@ private slots: | |||
235 | // This allows to run individual parts without doing a cleanup, but still cleaning up normally | 235 | // This allows to run individual parts without doing a cleanup, but still cleaning up normally |
236 | void testCleanupForCompleteTest() | 236 | void testCleanupForCompleteTest() |
237 | { | 237 | { |
238 | Sink::Store::removeDataFromDisk("sink.dummy.instance1").exec().waitForFinished(); | 238 | VERIFYEXEC(Sink::Store::removeDataFromDisk("sink.dummy.instance1")); |
239 | } | 239 | } |
240 | 240 | ||
241 | private: | 241 | private: |
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index 2ff31e5..be6e3a5 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -49,7 +49,7 @@ private slots: | |||
49 | void cleanup() | 49 | void cleanup() |
50 | { | 50 | { |
51 | qDebug() << "Test took " << time.elapsed(); | 51 | qDebug() << "Test took " << time.elapsed(); |
52 | Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1")).exec().waitForFinished(); | 52 | VERIFYEXEC(Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1"))); |
53 | } | 53 | } |
54 | 54 | ||
55 | void testProperty() | 55 | void testProperty() |
diff --git a/tests/inspectiontest.cpp b/tests/inspectiontest.cpp index 3e8a103..2879801 100644 --- a/tests/inspectiontest.cpp +++ b/tests/inspectiontest.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "resourcecontrol.h" | 7 | #include "resourcecontrol.h" |
8 | #include "resourceconfig.h" | 8 | #include "resourceconfig.h" |
9 | #include "log.h" | 9 | #include "log.h" |
10 | #include "testutils.h" | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * Test of inspection system using the dummy resource. | 13 | * Test of inspection system using the dummy resource. |
@@ -22,7 +23,7 @@ private slots: | |||
22 | auto factory = Sink::ResourceFactory::load("sink.dummy"); | 23 | auto factory = Sink::ResourceFactory::load("sink.dummy"); |
23 | QVERIFY(factory); | 24 | QVERIFY(factory); |
24 | ResourceConfig::addResource("sink.dummy.instance1", "sink.dummy"); | 25 | ResourceConfig::addResource("sink.dummy.instance1", "sink.dummy"); |
25 | Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1")).exec().waitForFinished(); | 26 | VERIFYEXEC(Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1"))); |
26 | } | 27 | } |
27 | 28 | ||
28 | void testInspection_data() | 29 | void testInspection_data() |
diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index 98ac685..7edda32 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp | |||
@@ -49,17 +49,12 @@ void MailSyncTest::initTestCase() | |||
49 | 49 | ||
50 | void MailSyncTest::cleanup() | 50 | void MailSyncTest::cleanup() |
51 | { | 51 | { |
52 | //TODO the shutdown job fails if the resource is already shut down | 52 | VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); |
53 | // VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); | ||
54 | ResourceControl::shutdown(mResourceInstanceIdentifier).exec().waitForFinished(); | ||
55 | removeResourceFromDisk(mResourceInstanceIdentifier); | 53 | removeResourceFromDisk(mResourceInstanceIdentifier); |
56 | } | 54 | } |
57 | 55 | ||
58 | void MailSyncTest::init() | 56 | void MailSyncTest::init() |
59 | { | 57 | { |
60 | qDebug(); | ||
61 | qDebug() << "-----------------------------------------"; | ||
62 | qDebug(); | ||
63 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); | 58 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); |
64 | } | 59 | } |
65 | 60 | ||
diff --git a/tests/mailtest.cpp b/tests/mailtest.cpp index 3339838..ae5295e 100644 --- a/tests/mailtest.cpp +++ b/tests/mailtest.cpp | |||
@@ -55,9 +55,6 @@ void MailTest::cleanup() | |||
55 | 55 | ||
56 | void MailTest::init() | 56 | void MailTest::init() |
57 | { | 57 | { |
58 | qDebug(); | ||
59 | qDebug() << "-----------------------------------------"; | ||
60 | qDebug(); | ||
61 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); | 58 | VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); |
62 | } | 59 | } |
63 | 60 | ||
diff --git a/tests/mailthreadtest.cpp b/tests/mailthreadtest.cpp index 917e3e2..3684514 100644 --- a/tests/mailthreadtest.cpp +++ b/tests/mailthreadtest.cpp | |||
@@ -52,9 +52,7 @@ void MailThreadTest::initTestCase() | |||
52 | 52 | ||
53 | void MailThreadTest::cleanup() | 53 | void MailThreadTest::cleanup() |
54 | { | 54 | { |
55 | //TODO the shutdown job fails if the resource is already shut down | 55 | VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); |
56 | // VERIFYEXEC(ResourceControl::shutdown(mResourceInstanceIdentifier)); | ||
57 | ResourceControl::shutdown(mResourceInstanceIdentifier).exec().waitForFinished(); | ||
58 | removeResourceFromDisk(mResourceInstanceIdentifier); | 56 | removeResourceFromDisk(mResourceInstanceIdentifier); |
59 | } | 57 | } |
60 | 58 | ||
diff --git a/tests/modelinteractivitytest.cpp b/tests/modelinteractivitytest.cpp index df0c772..6d1c51c 100644 --- a/tests/modelinteractivitytest.cpp +++ b/tests/modelinteractivitytest.cpp | |||
@@ -54,12 +54,12 @@ private slots: | |||
54 | { | 54 | { |
55 | Sink::Test::initTest(); | 55 | Sink::Test::initTest(); |
56 | ResourceConfig::addResource("sink.dummy.instance1", "sink.dummy"); | 56 | ResourceConfig::addResource("sink.dummy.instance1", "sink.dummy"); |
57 | Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1")).exec().waitForFinished(); | 57 | VERIFYEXEC(Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1"))); |
58 | } | 58 | } |
59 | 59 | ||
60 | void cleanup() | 60 | void cleanup() |
61 | { | 61 | { |
62 | Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1")).exec().waitForFinished(); | 62 | VERIFYEXEC(Sink::Store::removeDataFromDisk(QByteArray("sink.dummy.instance1"))); |
63 | } | 63 | } |
64 | 64 | ||
65 | void init() | 65 | void init() |