diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 16:02:38 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 16:02:38 +0100 |
commit | 1864024012213dc0a17c76e9755bf50a19944ec7 (patch) | |
tree | 06690c35c05c29deec30a3dd412d4043e2c956a3 /tests | |
parent | 6625bb5a2145008ad47ae963e1546714b7342bf0 (diff) | |
download | sink-1864024012213dc0a17c76e9755bf50a19944ec7.tar.gz sink-1864024012213dc0a17c76e9755bf50a19944ec7.zip |
Report when we don't have any more to fetch.
... so we can use that information in fetchMore.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clientapitest.cpp | 2 | ||||
-rw-r--r-- | tests/databasepopulationandfacadequerybenchmark.cpp | 2 | ||||
-rw-r--r-- | tests/mailquerybenchmark.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index 4afe328..d2fb747 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp | |||
@@ -78,7 +78,7 @@ public: | |||
78 | resultProvider->add(res); | 78 | resultProvider->add(res); |
79 | } | 79 | } |
80 | } | 80 | } |
81 | resultProvider->initialResultSetComplete(parent); | 81 | resultProvider->initialResultSetComplete(parent, true); |
82 | }); | 82 | }); |
83 | auto job = KAsync::syncStart<void>([query, resultProvider]() {}); | 83 | auto job = KAsync::syncStart<void>([query, resultProvider]() {}); |
84 | mResultProvider = resultProvider; | 84 | mResultProvider = resultProvider; |
diff --git a/tests/databasepopulationandfacadequerybenchmark.cpp b/tests/databasepopulationandfacadequerybenchmark.cpp index f1904ad..6bd2051 100644 --- a/tests/databasepopulationandfacadequerybenchmark.cpp +++ b/tests/databasepopulationandfacadequerybenchmark.cpp | |||
@@ -112,7 +112,7 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject | |||
112 | QList<Sink::ApplicationDomain::Event::Ptr> list; | 112 | QList<Sink::ApplicationDomain::Event::Ptr> list; |
113 | emitter->onAdded([&list](const Sink::ApplicationDomain::Event::Ptr &event) { list << event; }); | 113 | emitter->onAdded([&list](const Sink::ApplicationDomain::Event::Ptr &event) { list << event; }); |
114 | bool done = false; | 114 | bool done = false; |
115 | emitter->onInitialResultSetComplete([&done](const Sink::ApplicationDomain::Event::Ptr &event) { done = true; }); | 115 | emitter->onInitialResultSetComplete([&done](const Sink::ApplicationDomain::Event::Ptr &event, bool) { done = true; }); |
116 | emitter->fetch(Sink::ApplicationDomain::Event::Ptr()); | 116 | emitter->fetch(Sink::ApplicationDomain::Event::Ptr()); |
117 | QTRY_VERIFY(done); | 117 | QTRY_VERIFY(done); |
118 | QCOMPARE(list.size(), count); | 118 | QCOMPARE(list.size(), count); |
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp index 0e2f6fa..d3598b2 100644 --- a/tests/mailquerybenchmark.cpp +++ b/tests/mailquerybenchmark.cpp | |||
@@ -99,7 +99,7 @@ class MailQueryBenchmark : public QObject | |||
99 | QList<Mail::Ptr> list; | 99 | QList<Mail::Ptr> list; |
100 | emitter->onAdded([&list](const Mail::Ptr &mail) { list << mail; }); | 100 | emitter->onAdded([&list](const Mail::Ptr &mail) { list << mail; }); |
101 | bool done = false; | 101 | bool done = false; |
102 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail) { done = true; }); | 102 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail, bool) { done = true; }); |
103 | emitter->fetch(Mail::Ptr()); | 103 | emitter->fetch(Mail::Ptr()); |
104 | QTRY_VERIFY(done); | 104 | QTRY_VERIFY(done); |
105 | QCOMPARE(list.size(), query.limit()); | 105 | QCOMPARE(list.size(), query.limit()); |