patch 4.0
This commit is contained in:
@ -18,68 +18,49 @@
|
||||
#include "rootserver/ob_root_utils.h"
|
||||
#include "lib/oblog/ob_log.h"
|
||||
#include "lib/json/ob_json.h"
|
||||
namespace oceanbase {
|
||||
namespace rootserver {
|
||||
class ObFakeCB : public ObIStatusChangeCallback {
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace rootserver
|
||||
{
|
||||
class ObFakeCB : public ObIStatusChangeCallback
|
||||
{
|
||||
public:
|
||||
ObFakeCB()
|
||||
{}
|
||||
int wakeup_balancer()
|
||||
{
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
int wakeup_daily_merger()
|
||||
{
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
int on_start_server(const common::ObAddr& server)
|
||||
{
|
||||
UNUSED(server);
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
int on_stop_server(const common::ObAddr& server)
|
||||
{
|
||||
UNUSED(server);
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
int on_server_status_change(const common::ObAddr& server)
|
||||
{
|
||||
UNUSED(server);
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
ObFakeCB() {}
|
||||
int wakeup_balancer() { return OB_SUCCESS; }
|
||||
int wakeup_daily_merger() { return OB_SUCCESS; }
|
||||
int on_start_server(const common::ObAddr &server) {UNUSED(server); return OB_SUCCESS;}
|
||||
int on_stop_server(const common::ObAddr &server) {UNUSED(server); return OB_SUCCESS;}
|
||||
int on_server_status_change(const common::ObAddr &server) {UNUSED(server); return OB_SUCCESS;}
|
||||
};
|
||||
|
||||
class ObFakeServerChangeCB : public ObIServerChangeCallback {
|
||||
class ObFakeServerChangeCB : public ObIServerChangeCallback
|
||||
{
|
||||
public:
|
||||
ObFakeServerChangeCB()
|
||||
{}
|
||||
virtual ~ObFakeServerChangeCB()
|
||||
{}
|
||||
ObFakeServerChangeCB() {}
|
||||
virtual ~ObFakeServerChangeCB() {}
|
||||
virtual int on_server_change()
|
||||
{
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
||||
class ObNeverStopForTestOnly : public share::ObCheckStopProvider {
|
||||
|
||||
class ObNeverStopForTestOnly : public share::ObCheckStopProvider
|
||||
{
|
||||
public:
|
||||
ObNeverStopForTestOnly()
|
||||
{}
|
||||
virtual ~ObNeverStopForTestOnly()
|
||||
{}
|
||||
virtual int check_stop() const
|
||||
{
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
ObNeverStopForTestOnly() {}
|
||||
virtual ~ObNeverStopForTestOnly() {}
|
||||
virtual int check_stop() const { return OB_SUCCESS; }
|
||||
};
|
||||
|
||||
|
||||
// parse the case file using JSON parser
|
||||
void ob_parse_case_file(common::ObArenaAllocator& allocator, const char* case_file, json::Value*& root);
|
||||
void ob_parse_case_file(common::ObArenaAllocator &allocator, const char* case_file, json::Value *&root);
|
||||
// compare the result and output for the case
|
||||
void ob_check_result(const char* base_dir, const char* casename);
|
||||
|
||||
} // end namespace rootserver
|
||||
} // end namespace oceanbase
|
||||
} // end namespace rootserver
|
||||
} // end namespace oceanbase
|
||||
|
||||
inline void init_oblog_for_rs_test(const char* test_name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user