diff options
Diffstat (limited to 'tests/mailquerybenchmark.cpp')
-rw-r--r-- | tests/mailquerybenchmark.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp index 20ee63c..4e58899 100644 --- a/tests/mailquerybenchmark.cpp +++ b/tests/mailquerybenchmark.cpp | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <common/pipeline.h> | 33 | #include <common/pipeline.h> |
34 | #include <common/index.h> | 34 | #include <common/index.h> |
35 | #include <common/indexupdater.h> | 35 | #include <common/indexupdater.h> |
36 | #include <common/adaptorfactoryregistry.h> | ||
36 | 37 | ||
37 | #include "hawd/dataset.h" | 38 | #include "hawd/dataset.h" |
38 | #include "hawd/formatter.h" | 39 | #include "hawd/formatter.h" |
@@ -59,12 +60,11 @@ class MailQueryBenchmark : public QObject | |||
59 | TestResource::removeFromDisk(resourceIdentifier); | 60 | TestResource::removeFromDisk(resourceIdentifier); |
60 | 61 | ||
61 | auto pipeline = QSharedPointer<Sink::Pipeline>::create(resourceIdentifier); | 62 | auto pipeline = QSharedPointer<Sink::Pipeline>::create(resourceIdentifier); |
63 | pipeline->setResourceType("test"); | ||
62 | 64 | ||
63 | auto mailFactory = QSharedPointer<TestMailAdaptorFactory>::create(); | ||
64 | auto indexer = QSharedPointer<DefaultIndexUpdater<Sink::ApplicationDomain::Mail>>::create(); | 65 | auto indexer = QSharedPointer<DefaultIndexUpdater<Sink::ApplicationDomain::Mail>>::create(); |
65 | 66 | ||
66 | pipeline->setPreprocessors("mail", QVector<Sink::Preprocessor *>() << indexer.data()); | 67 | pipeline->setPreprocessors("mail", QVector<Sink::Preprocessor *>() << indexer.data()); |
67 | pipeline->setAdaptorFactory("mail", mailFactory); | ||
68 | 68 | ||
69 | auto domainTypeAdaptorFactory = QSharedPointer<TestMailAdaptorFactory>::create(); | 69 | auto domainTypeAdaptorFactory = QSharedPointer<TestMailAdaptorFactory>::create(); |
70 | 70 | ||
@@ -149,6 +149,7 @@ private slots: | |||
149 | void init() | 149 | void init() |
150 | { | 150 | { |
151 | resourceIdentifier = "org.kde.test.instance1"; | 151 | resourceIdentifier = "org.kde.test.instance1"; |
152 | Sink::AdaptorFactoryRegistry::instance().registerFactory<Sink::ApplicationDomain::Mail, TestMailAdaptorFactory>("test"); | ||
152 | } | 153 | } |
153 | 154 | ||
154 | void test50k() | 155 | void test50k() |