summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/dummyresourcetest.cpp31
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 &notification) {
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
312QTEST_MAIN(DummyResourceTest) 281QTEST_MAIN(DummyResourceTest)