summaryrefslogtreecommitdiff
path: root/test/run_storage.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-10 22:14:07 +0100
committerMax Kellermann <max@musicpd.org>2017-02-10 22:25:01 +0100
commitd1456ae039465dce44516624c1d44ee02b9f7613 (patch)
treeace78ac87758adb027ce86ee83029aa9cbaa190a /test/run_storage.cxx
parent115af4f5650f0c48a16765184050b509be7876b0 (diff)
test/*: use class EventThread instead of ScopeIOThread
Diffstat (limited to 'test/run_storage.cxx')
-rw-r--r--test/run_storage.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/run_storage.cxx b/test/run_storage.cxx
index 805211fe0..3d33772ea 100644
--- a/test/run_storage.cxx
+++ b/test/run_storage.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "Log.hxx"
-#include "ScopeIOThread.hxx"
+#include "event/Thread.hxx"
#include "storage/Registry.hxx"
#include "storage/StorageInterface.hxx"
#include "storage/FileInfo.hxx"
@@ -34,9 +34,9 @@
#include <time.h>
static Storage *
-MakeStorage(const char *uri)
+MakeStorage(EventLoop &event_loop, const char *uri)
{
- Storage *storage = CreateStorageURI(io_thread_get(), uri);
+ Storage *storage = CreateStorageURI(event_loop, uri);
if (storage == nullptr)
throw std::runtime_error("Unrecognized storage URI");
@@ -95,7 +95,8 @@ try {
const char *const command = argv[1];
const char *const storage_uri = argv[2];
- const ScopeIOThread io_thread;
+ EventThread io_thread;
+ io_thread.Start();
if (strcmp(command, "ls") == 0) {
if (argc != 4) {
@@ -105,7 +106,8 @@ try {
const char *const path = argv[3];
- std::unique_ptr<Storage> storage(MakeStorage(storage_uri));
+ std::unique_ptr<Storage> storage(MakeStorage(io_thread.GetEventLoop(),
+ storage_uri));
return Ls(*storage, path);
} else {