diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-19 19:26:14 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-19 19:26:14 +0100 |
commit | dd6196206f87086a636677da55cf5c300a8e932a (patch) | |
tree | 246be20e4ff5568df01dfdc7411a0267f1f1b028 /tests/dummyresourcetest.cpp | |
parent | 65e5a6ac8848750e94e35ec65ac37d0d4a8638cd (diff) | |
download | sink-dd6196206f87086a636677da55cf5c300a8e932a.tar.gz sink-dd6196206f87086a636677da55cf5c300a8e932a.zip |
Fixed sync, detect errors during sync, wait until sync items are processed until signalling completion.
Diffstat (limited to 'tests/dummyresourcetest.cpp')
-rw-r--r-- | tests/dummyresourcetest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index a80d22f..56e5513 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -31,7 +31,7 @@ private Q_SLOTS: | |||
31 | removeFromDisk("org.kde.dummy.synchronizerqueue"); | 31 | removeFromDisk("org.kde.dummy.synchronizerqueue"); |
32 | } | 32 | } |
33 | 33 | ||
34 | void cleanupTestCase() | 34 | void cleanup() |
35 | { | 35 | { |
36 | removeFromDisk("org.kde.dummy"); | 36 | removeFromDisk("org.kde.dummy"); |
37 | removeFromDisk("org.kde.dummy.userqueue"); | 37 | removeFromDisk("org.kde.dummy.userqueue"); |
@@ -97,9 +97,14 @@ private Q_SLOTS: | |||
97 | { | 97 | { |
98 | Akonadi2::Pipeline pipeline("org.kde.dummy"); | 98 | Akonadi2::Pipeline pipeline("org.kde.dummy"); |
99 | DummyResource resource; | 99 | DummyResource resource; |
100 | resource.configurePipeline(&pipeline); | ||
100 | auto job = resource.synchronizeWithSource(&pipeline); | 101 | auto job = resource.synchronizeWithSource(&pipeline); |
102 | //TODO pass in optional timeout? | ||
101 | auto future = job.exec(); | 103 | auto future = job.exec(); |
104 | future.waitForFinished(); | ||
105 | QVERIFY(!future.errorCode()); | ||
102 | QTRY_VERIFY(future.isFinished()); | 106 | QTRY_VERIFY(future.isFinished()); |
107 | QVERIFY(!resource.error()); | ||
103 | } | 108 | } |
104 | 109 | ||
105 | void testSyncAndFacade() | 110 | void testSyncAndFacade() |