reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -23,7 +23,7 @@ using namespace oceanbase::observer;
#define OMT_UNITTEST
class TestManageTenant : public ::testing::Test, public ObMultiTenant {
public:
public:
TestManageTenant() : ObMultiTenant(procor_)
{
all_mock_init();
@ -35,7 +35,7 @@ class TestManageTenant : public ::testing::Test, public ObMultiTenant {
virtual void TearDown()
{}
protected:
protected:
ObFakeWorkerProcessor procor_;
ObGlobalContext gctx_;
};

View File

@ -40,7 +40,7 @@ using namespace oceanbase::observer;
#define OMT_UNITTEST
class MockObPxPools : public ObPxPools {
public:
public:
MockObPxPools() : ObPxPools()
{
this_seq_ = MockObPxPools::seq_++;
@ -69,7 +69,7 @@ class MockObPxPools : public ObPxPools {
return this_seq_;
}
private:
private:
static int64_t seq_;
int64_t this_seq_;
};
@ -78,7 +78,7 @@ int64_t MockObPxPools::seq_ = 0;
class MockOMT : public ObMultiTenant {
static constexpr auto TIMES_OF_WORKERS = 10;
public:
public:
MockOMT() : ObMultiTenant(procor_)
{}
int add_tenant(uint64_t tenant_id)
@ -86,11 +86,11 @@ class MockOMT : public ObMultiTenant {
return ObMultiTenant::add_tenant(tenant_id, 1, 1);
}
private:
private:
ObFakeWorkerProcessor procor_;
};
class TestMultiTenant : public ::testing::Test {
public:
public:
TestMultiTenant()
{
all_mock_init();
@ -137,7 +137,7 @@ class TestMultiTenant : public ::testing::Test {
// void clear() { omt_.clear(); }
protected:
protected:
MockOMT omt_;
};
@ -216,7 +216,7 @@ TEST_F(TestMultiTenant, get_tenant_context)
}
class CtxMemConfigGetter : public ObICtxMemConfigGetter {
public:
public:
virtual int get(common::ObIArray<ObCtxMemConfig>& configs)
{
int ret = OB_SUCCESS;

View File

@ -29,7 +29,7 @@ static constexpr auto TIMES_OF_WORKERS = 10;
// Fake ObTenant class
class MockTenant : public ObTenant {
public:
public:
MockTenant(const int64_t id, ObWorkerPool& worker_pool) : ObTenant(id, TIMES_OF_WORKERS, worker_pool, ctrl_)
{
stopped_ = false;
@ -40,7 +40,7 @@ class MockTenant : public ObTenant {
MOCK_CONST_METHOD0(waiting_count, int64_t());
private:
private:
ObCgroupCtrl ctrl_;
};
@ -49,7 +49,7 @@ class MockTenant : public ObTenant {
// get_tenant_list()
// add_tenant()
class MockOMT : public ObMultiTenant {
public:
public:
MockOMT() : ObMultiTenant(procor_)
{}
@ -66,12 +66,12 @@ class MockOMT : public ObMultiTenant {
tenants_.reset();
}
private:
private:
ObFakeWorkerProcessor procor_;
};
class TestTokenCalcer : public ::testing::Test {
public:
public:
TestTokenCalcer() : otc_(omt_)
{
all_mock_init();
@ -98,7 +98,7 @@ class TestTokenCalcer : public ::testing::Test {
omt_.clear();
}
protected:
protected:
ObTenant* t1_;
ObTenant* t2_;
ObTenant* t3_;

View File

@ -23,7 +23,7 @@ using namespace oceanbase::omt;
using namespace oceanbase::observer;
class TestWorker : public ObThWorker, public ::testing::Test {
public:
public:
TestWorker() : ObThWorker(procor_), omt_(procor_)
{
all_mock_init();
@ -46,7 +46,7 @@ class TestWorker : public ObThWorker, public ::testing::Test {
destroy();
}
protected:
protected:
ObFakeWorkerProcessor procor_;
ObMultiTenant omt_;
};

View File

@ -21,7 +21,7 @@ using namespace oceanbase::omt;
using namespace oceanbase::observer;
class TestWorkerPool : public ::testing::Test {
public:
public:
TestWorkerPool() : pool_(procor_)
{}
@ -35,7 +35,7 @@ class TestWorkerPool : public ::testing::Test {
pool_.destroy();
}
protected:
protected:
ObFakeWorkerProcessor procor_;
ObGlobalContext gctx_;
ObWorkerPool pool_;

View File

@ -33,7 +33,7 @@ namespace observer {
class TestInformationSchemaService : public ::testing::Test {
typedef int (*schema_create_func)(share::schema::ObTableSchema& table_schema);
public:
public:
TestInformationSchemaService();
virtual ~TestInformationSchemaService()
{}
@ -47,7 +47,7 @@ class TestInformationSchemaService : public ::testing::Test {
void fill_session();
protected:
protected:
// ObSchemaManager schema_manager_;
ObArenaAllocator allocator_;
sql::ObSQLSessionInfo session_info_;
@ -117,7 +117,7 @@ void TestInformationSchemaService::fill_table_schema(
}
class MockObSchemaGetterGuard : public ObSchemaGetterGuard {
public:
public:
int add_database_schema(ObDatabaseSchema* database_schema);
int add_table_schema(ObTableSchema* table_schema);
MOCK_METHOD2(get_database_schemas_in_tenant,
@ -128,7 +128,7 @@ class MockObSchemaGetterGuard : public ObSchemaGetterGuard {
int get_table_schemas_from_database(
const uint64_t tenant_id, const uint64_t database_id, ObIArray<const ObTableSchema*>& table_schemas);
private:
private:
ObSArray<const ObDatabaseSchema*> database_schemas_;
ObSArray<const ObTableSchema*> table_schemas_;
};

View File

@ -24,7 +24,7 @@ namespace oceanbase {
namespace obrpc {
RPC_S_S(@PR5 test, OB_TEST_PCODE);
class TestProxy : public ObRpcProxy {
public:
public:
DEFINE_TO(TestProxy);
RPC_S_M(@PR5 test, OB_TEST_PCODE);
@ -37,13 +37,13 @@ namespace oceanbase {
namespace unittest {
class Client : public share::ObThreadPool {
public:
public:
Client(const obrpc::TestProxy& proxy) : proxy_(proxy)
{}
virtual void run1();
private:
private:
const obrpc::TestProxy& proxy_;
}; // end of class Client