From 5892cf6b29c62cc632e94b22624a0bbbe6c21c54 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 25 Jul 2018 17:31:31 +0200 Subject: Shutdown resources at the end of the test to keep them from blocking the test from exiting. --- tests/teststore.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/teststore.cpp') 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) Sink::ResourceControl::flushMessageQueue(resources).exec().waitForFinished(); } +void TestStore::shutdownResources() +{ + const auto resources = Sink::Store::read({}); + for (const auto &resource : resources) { + Sink::ResourceControl::shutdown(resource.identifier()).exec().waitForFinished(); + } +} + QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter) { using namespace Sink::ApplicationDomain; -- cgit v1.2.3