MXS-2218 Implement housekeeper in terms of MainWorker
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include <iostream>
|
||||
#include <maxbase/log.hh>
|
||||
#include <maxscale/housekeeper.h>
|
||||
#include <maxscale/mainworker.hh>
|
||||
#include "test_utils.hh"
|
||||
|
||||
using namespace std;
|
||||
@ -92,23 +93,13 @@ int main(int argc, char** argv)
|
||||
|
||||
init_test_env();
|
||||
|
||||
if (hkinit())
|
||||
{
|
||||
if (hkstart())
|
||||
{
|
||||
rc = test();
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "Could not start the housekeeper." << endl;
|
||||
}
|
||||
maxscale::MainWorker mw;
|
||||
mw.start();
|
||||
|
||||
hkfinish();
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "Could not initialize the housekeeper." << endl;
|
||||
}
|
||||
rc = test();
|
||||
|
||||
mw.shutdown();
|
||||
mw.join();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ void init_test_env(char* __attribute((unused)) path = nullptr, uint32_t init_typ
|
||||
poll_init();
|
||||
maxbase::init();
|
||||
maxscale::RoutingWorker::init();
|
||||
hkinit();
|
||||
set_libdir(MXS_STRDUP(old_libdir.c_str()));
|
||||
|
||||
preload_module("mariadbclient", "server/modules/protocol/MySQL/mariadbclient/", MODULE_PROTOCOL);
|
||||
|
Reference in New Issue
Block a user