summaryrefslogtreecommitdiffstats
path: root/tests/teststore.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-25 17:31:31 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-25 17:31:31 +0200
commit5892cf6b29c62cc632e94b22624a0bbbe6c21c54 (patch)
tree5bd071420c3fe3c71102c427c37e952449e90131 /tests/teststore.cpp
parent58f472fa0a87d21f28d58244686b332f99d5a52c (diff)
downloadkube-5892cf6b29c62cc632e94b22624a0bbbe6c21c54.tar.gz
kube-5892cf6b29c62cc632e94b22624a0bbbe6c21c54.zip
Shutdown resources at the end of the test
to keep them from blocking the test from exiting.
Diffstat (limited to 'tests/teststore.cpp')
-rw-r--r--tests/teststore.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp
index 71b19499..c69588ef 100644
--- a/tests/teststore.cpp
+++ b/tests/teststore.cpp
@@ -243,6 +243,14 @@ void TestStore::setup(const QVariantMap &map)
243 Sink::ResourceControl::flushMessageQueue(resources).exec().waitForFinished(); 243 Sink::ResourceControl::flushMessageQueue(resources).exec().waitForFinished();
244} 244}
245 245
246void TestStore::shutdownResources()
247{
248 const auto resources = Sink::Store::read<Sink::ApplicationDomain::SinkResource>({});
249 for (const auto &resource : resources) {
250 Sink::ResourceControl::shutdown(resource.identifier()).exec().waitForFinished();
251 }
252}
253
246QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter) 254QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter)
247{ 255{
248 using namespace Sink::ApplicationDomain; 256 using namespace Sink::ApplicationDomain;