summaryrefslogtreecommitdiff
path: root/test/run_storage.cxx
diff options
context:
space:
mode:
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 {