test/*: use class EventThread instead of ScopeIOThread
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user