MXS-2218 Implement housekeeper in terms of MainWorker

This commit is contained in:
Johan Wikman
2019-01-08 10:23:16 +02:00
parent 026bf747e6
commit 6ba2cb61df
7 changed files with 44 additions and 65 deletions

View File

@ -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;
}

View File

@ -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);