patch 4.0
This commit is contained in:
@ -15,27 +15,21 @@
|
||||
|
||||
#include "share/ob_rs_mgr.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace share {
|
||||
class MockObRsMgr : public ObRsMgr {
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace share
|
||||
{
|
||||
class MockObRsMgr : public ObRsMgr
|
||||
{
|
||||
public:
|
||||
MOCK_CONST_METHOD1(get_master_root_server, int(common::ObAddr&));
|
||||
virtual ~MockObRsMgr()
|
||||
{}
|
||||
MOCK_CONST_METHOD1(get_master_root_server, int(common::ObAddr &));
|
||||
virtual ~MockObRsMgr() {}
|
||||
|
||||
int get_master_root_server_wrapper(common::ObAddr& rs)
|
||||
{
|
||||
rs = global_rs();
|
||||
return common::OB_SUCCESS;
|
||||
}
|
||||
int get_master_root_server_wrapper(common::ObAddr &rs) { rs = global_rs(); return common::OB_SUCCESS; }
|
||||
|
||||
static common::ObAddr& global_rs()
|
||||
{
|
||||
static common::ObAddr addr;
|
||||
return addr;
|
||||
}
|
||||
static common::ObAddr &global_rs() { static common::ObAddr addr; return addr; }
|
||||
};
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
}//end namespace share
|
||||
}//end namespace oceanbase
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user