diff options
author | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-20 18:33:05 +0200 |
---|---|---|
committer | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-20 18:33:05 +0200 |
commit | 6db02b1f5b3d47578e1bc0a9bb7ca85da2fe2de8 (patch) | |
tree | dd0f3774c1be35eb4c751bcb23a1e20959b099a8 | |
parent | 8da2b5bb3ae33e2e24f4048aec09c7ce9dbc6862 (diff) | |
download | sink-6db02b1f5b3d47578e1bc0a9bb7ca85da2fe2de8.tar.gz sink-6db02b1f5b3d47578e1bc0a9bb7ca85da2fe2de8.zip |
No benchmarking in tests
-rw-r--r-- | tests/dummyresourcetest.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index 28e8337..6f307e6 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -276,37 +276,6 @@ private slots: | |||
276 | QTRY_COMPARE(model->rowCount(QModelIndex()), 0); | 276 | QTRY_COMPARE(model->rowCount(QModelIndex()), 0); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | |||
280 | void testCommandResponsiveness() | ||
281 | { | ||
282 | // Test responsiveness including starting the process. | ||
283 | VERIFYEXEC(Sink::Store::removeDataFromDisk("sink.dummy.instance1")); | ||
284 | |||
285 | QTime time; | ||
286 | time.start(); | ||
287 | |||
288 | Sink::ApplicationDomain::Event event("sink.dummy.instance1"); | ||
289 | event.setProperty("uid", "testuid"); | ||
290 | QCOMPARE(event.getProperty("uid").toByteArray(), QByteArray("testuid")); | ||
291 | event.setProperty("summary", "summaryValue"); | ||
292 | |||
293 | auto notifier = QSharedPointer<Sink::Notifier>::create("sink.dummy.instance1", "sink.dummy"); | ||
294 | bool gotNotification = false; | ||
295 | int duration = 0; | ||
296 | notifier->registerHandler([&gotNotification, &duration, &time](const Sink::Notification ¬ification) { | ||
297 | if (notification.type == Sink::Notification::RevisionUpdate) { | ||
298 | gotNotification = true; | ||
299 | duration = time.elapsed(); | ||
300 | } | ||
301 | }); | ||
302 | |||
303 | Sink::Store::create<Sink::ApplicationDomain::Event>(event).exec(); | ||
304 | // Wait for notification | ||
305 | QUICK_TRY_VERIFY(gotNotification); | ||
306 | |||
307 | QVERIFY2(duration < 100, QString::fromLatin1("Processing a create command took more than 100ms: %1").arg(duration).toLatin1()); | ||
308 | VERIFYEXEC(Sink::ResourceControl::shutdown("sink.dummy.instance1")); | ||
309 | } | ||
310 | }; | 279 | }; |
311 | 280 | ||
312 | QTEST_MAIN(DummyResourceTest) | 281 | QTEST_MAIN(DummyResourceTest) |