summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-07 21:48:44 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-07 21:48:44 +0100
commit89b6f63bab839ab0504cd3067f0389afe4dc47e3 (patch)
tree62c527983d63827bb722010ea8c59d5af0e5a879 /tests
parent438c74630e5f8c9a46d00b991f5cb8ecd479dafe (diff)
downloadsink-89b6f63bab839ab0504cd3067f0389afe4dc47e3.tar.gz
sink-89b6f63bab839ab0504cd3067f0389afe4dc47e3.zip
Implement debug stream operators for query.
Diffstat (limited to 'tests')
-rw-r--r--tests/dummyresourcetest.cpp2
-rw-r--r--tests/maildirsyncbenchmark.cpp2
-rw-r--r--tests/testimplementations.h6
3 files changed, 7 insertions, 3 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp
index f8d8543..eea63c0 100644
--- a/tests/dummyresourcetest.cpp
+++ b/tests/dummyresourcetest.cpp
@@ -136,7 +136,7 @@ private slots:
136 void testResourceSync() 136 void testResourceSync()
137 { 137 {
138 ::DummyResource resource(getContext()); 138 ::DummyResource resource(getContext());
139 auto job = resource.synchronizeWithSource(); 139 auto job = resource.synchronizeWithSource(Sink::QueryBase());
140 // TODO pass in optional timeout? 140 // TODO pass in optional timeout?
141 auto future = job.exec(); 141 auto future = job.exec();
142 future.waitForFinished(); 142 future.waitForFinished();
diff --git a/tests/maildirsyncbenchmark.cpp b/tests/maildirsyncbenchmark.cpp
index d84c758..ab09395 100644
--- a/tests/maildirsyncbenchmark.cpp
+++ b/tests/maildirsyncbenchmark.cpp
@@ -87,7 +87,7 @@ private slots:
87 MaildirResource resource("sink.maildir.test1", pipeline); 87 MaildirResource resource("sink.maildir.test1", pipeline);
88 QTime time; 88 QTime time;
89 time.start(); 89 time.start();
90 resource.Sink::GenericResource::synchronizeWithSource().exec().waitForFinished(); 90 resource.Sink::GenericResource::synchronizeWithSource(Sink::QueryBase()).exec().waitForFinished();
91 std::cout << "Sync took " << time.elapsed() << std::endl; 91 std::cout << "Sync took " << time.elapsed() << std::endl;
92 resource.processAllMessages().exec().waitForFinished(); 92 resource.processAllMessages().exec().waitForFinished();
93 const auto allProcessedTime = time.elapsed(); 93 const auto allProcessedTime = time.elapsed();
diff --git a/tests/testimplementations.h b/tests/testimplementations.h
index cf7a3da..111c884 100644
--- a/tests/testimplementations.h
+++ b/tests/testimplementations.h
@@ -70,6 +70,10 @@ public:
70 { 70 {
71 return KAsync::null<void>(); 71 return KAsync::null<void>();
72 } 72 }
73 KAsync::Job<void> synchronizeResource(const Sink::QueryBase &) Q_DECL_OVERRIDE
74 {
75 return KAsync::null<void>();
76 }
73 77
74public slots: 78public slots:
75 void open() Q_DECL_OVERRIDE 79 void open() Q_DECL_OVERRIDE
@@ -111,7 +115,7 @@ public:
111 { 115 {
112 } 116 }
113 117
114 KAsync::Job<void> synchronizeWithSource() Q_DECL_OVERRIDE 118 KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &query) Q_DECL_OVERRIDE
115 { 119 {
116 return KAsync::null<void>(); 120 return KAsync::null<void>();
117 } 121 }