diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-20 19:07:07 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-20 19:07:07 +0100 |
commit | bdb01c2c068df326f5a8328ed1492ab1bea388c5 (patch) | |
tree | 25c2ee1b29bc481b6914c244ed9ca194b1415d16 /tests/modelinteractivitytest.cpp | |
parent | 17e7ee40c9185c0505883853345fd6024c675b1a (diff) | |
download | sink-bdb01c2c068df326f5a8328ed1492ab1bea388c5.tar.gz sink-bdb01c2c068df326f5a8328ed1492ab1bea388c5.zip |
Renamed Akonadi2 to Sink
(except for documentation).
Diffstat (limited to 'tests/modelinteractivitytest.cpp')
-rw-r--r-- | tests/modelinteractivitytest.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/modelinteractivitytest.cpp b/tests/modelinteractivitytest.cpp index 59c2c6f..14c9fd0 100644 --- a/tests/modelinteractivitytest.cpp +++ b/tests/modelinteractivitytest.cpp | |||
@@ -45,16 +45,16 @@ class ModelinteractivityTest : public QObject | |||
45 | private Q_SLOTS: | 45 | private Q_SLOTS: |
46 | void initTestCase() | 46 | void initTestCase() |
47 | { | 47 | { |
48 | Akonadi2::Log::setDebugOutputLevel(Akonadi2::Log::Warning); | 48 | Sink::Log::setDebugOutputLevel(Sink::Log::Warning); |
49 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | 49 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); |
50 | ResourceConfig::addResource("org.kde.dummy.instance1", "org.kde.dummy"); | 50 | ResourceConfig::addResource("org.kde.dummy.instance1", "org.kde.dummy"); |
51 | } | 51 | } |
52 | 52 | ||
53 | void cleanup() | 53 | void cleanup() |
54 | { | 54 | { |
55 | Akonadi2::Store::shutdown(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); | 55 | Sink::Store::shutdown(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); |
56 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | 56 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); |
57 | Akonadi2::Store::start(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); | 57 | Sink::Store::start(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); |
58 | } | 58 | } |
59 | 59 | ||
60 | void init() | 60 | void init() |
@@ -65,24 +65,24 @@ private Q_SLOTS: | |||
65 | { | 65 | { |
66 | //Setup | 66 | //Setup |
67 | { | 67 | { |
68 | Akonadi2::ApplicationDomain::Mail mail("org.kde.dummy.instance1"); | 68 | Sink::ApplicationDomain::Mail mail("org.kde.dummy.instance1"); |
69 | for (int i = 0; i < 1000; i++) { | 69 | for (int i = 0; i < 1000; i++) { |
70 | Akonadi2::Store::create<Akonadi2::ApplicationDomain::Mail>(mail).exec().waitForFinished(); | 70 | Sink::Store::create<Sink::ApplicationDomain::Mail>(mail).exec().waitForFinished(); |
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
74 | Akonadi2::Query query; | 74 | Sink::Query query; |
75 | query.resources << "org.kde.dummy.instance1"; | 75 | query.resources << "org.kde.dummy.instance1"; |
76 | query.liveQuery = true; | 76 | query.liveQuery = true; |
77 | 77 | ||
78 | Akonadi2::Store::flushMessageQueue(query.resources).exec().waitForFinished(); | 78 | Sink::Store::flushMessageQueue(query.resources).exec().waitForFinished(); |
79 | 79 | ||
80 | //Test | 80 | //Test |
81 | QTime time; | 81 | QTime time; |
82 | time.start(); | 82 | time.start(); |
83 | auto model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Mail>(query); | 83 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); |
84 | blockingTime += time.elapsed(); | 84 | blockingTime += time.elapsed(); |
85 | QTRY_VERIFY(model->data(QModelIndex(), Akonadi2::Store::ChildrenFetchedRole).toBool()); | 85 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); |
86 | //Never block longer than 10 ms | 86 | //Never block longer than 10 ms |
87 | QVERIFY2(blockingTime < 10, QString("Total blocking time: %1").arg(blockingTime).toLatin1().data()); | 87 | QVERIFY2(blockingTime < 10, QString("Total blocking time: %1").arg(blockingTime).toLatin1().data()); |
88 | } | 88 | } |