fix null mod_name
This commit is contained in:
2
unittest/share/cache/ob_cache_test_utils.h
vendored
2
unittest/share/cache/ob_cache_test_utils.h
vendored
@ -325,7 +325,7 @@ public:
|
||||
int ret = OB_SUCCESS;
|
||||
const int64_t buf_size = sizeof(task);
|
||||
void *ptr = NULL;
|
||||
if (NULL == (ptr = ob_malloc(buf_size))) {
|
||||
if (NULL == (ptr = ob_malloc(buf_size, ObNewModIds::TEST))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
COMMON_LOG(WARN, "ob_malloc failed", K(ret), K(buf_size));
|
||||
} else {
|
||||
|
||||
@ -153,7 +153,8 @@ public:
|
||||
cout << "\n<<<<<<<<<<<<<<<<<<<<" << "start case" << case_num << ">>>>>>>>>>>>>>>>>>>>" << endl;
|
||||
// do not use rpc, will core dump
|
||||
// ASSERT_EQ(OB_SUCCESS, MTL(ObDeadLockDetectorMgr*)->init());
|
||||
oceancase::unittest::MockDeadLockRpc *rpc = (oceancase::unittest::MockDeadLockRpc *)ob_malloc(sizeof(oceancase::unittest::MockDeadLockRpc));
|
||||
oceancase::unittest::MockDeadLockRpc *rpc = (oceancase::unittest::MockDeadLockRpc *)ob_malloc(sizeof(oceancase::unittest::MockDeadLockRpc),
|
||||
ObNewModIds::TEST);
|
||||
rpc = new (rpc) oceancase::unittest::MockDeadLockRpc();
|
||||
MTL(ObDeadLockDetectorMgr*)->rpc_ = rpc;
|
||||
|
||||
|
||||
@ -279,7 +279,8 @@ TEST_F(TestTenantResource, mtl_switch)
|
||||
|
||||
TEST_F(TestTenantResource, tenant_base_set)
|
||||
{
|
||||
transaction::ObTransService* trans_service = (transaction::ObTransService*)ob_malloc(sizeof(transaction::ObTransService));
|
||||
transaction::ObTransService* trans_service = (transaction::ObTransService*)ob_malloc(sizeof(transaction::ObTransService),
|
||||
ObNewModIds::TEST);
|
||||
ObTenantBase tenant_base(1);
|
||||
tenant_base.set(trans_service);
|
||||
ObTenantEnv::set_tenant(&tenant_base);
|
||||
|
||||
Reference in New Issue
Block a user