patch 4.0
This commit is contained in:
@ -10,25 +10,24 @@
|
||||
* See the Mulan PubL v2 for more details.
|
||||
*/
|
||||
|
||||
#include "storage/transaction/ob_trans_memory_stat.h"
|
||||
#include "storage/tx/ob_trans_memory_stat.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include "share/ob_errno.h"
|
||||
#include "lib/oblog/ob_log.h"
|
||||
#include "common/ob_partition_key.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace oceanbase
|
||||
{
|
||||
using namespace common;
|
||||
using namespace transaction;
|
||||
namespace unittest {
|
||||
class TestObTransMemStat : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp()
|
||||
{}
|
||||
virtual void TearDown()
|
||||
{}
|
||||
|
||||
public:
|
||||
static const char* LOCAL_IP;
|
||||
namespace unittest
|
||||
{
|
||||
class TestObTransMemStat : public ::testing::Test
|
||||
{
|
||||
public :
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
public :
|
||||
static const char *LOCAL_IP;
|
||||
static const int32_t PORT = 8080;
|
||||
static const ObAddr::VER IP_TYPE = ObAddr::IPV4;
|
||||
|
||||
@ -36,13 +35,13 @@ public:
|
||||
static const int32_t VALID_PARTITION_ID = 1;
|
||||
static const int32_t VALID_PARTITION_COUNT = 100;
|
||||
};
|
||||
const char* TestObTransMemStat::LOCAL_IP = "127.0.0.1";
|
||||
const char *TestObTransMemStat::LOCAL_IP = "127.0.0.1";
|
||||
|
||||
TEST_F(TestObTransMemStat, init_reset)
|
||||
{
|
||||
TRANS_LOG(INFO, "called", "func", test_info_->name());
|
||||
// create an obejct of ObTtransID
|
||||
const char* buffer = "ObTransCtx";
|
||||
const char *buffer = "ObTransCtx";
|
||||
const int64_t alloc_count = 100;
|
||||
const int64_t release_count = 100;
|
||||
ObAddr observer(TestObTransMemStat::IP_TYPE, TestObTransMemStat::LOCAL_IP, TestObTransMemStat::PORT);
|
||||
@ -56,16 +55,16 @@ TEST_F(TestObTransMemStat, init_reset)
|
||||
EXPECT_EQ(mem_stat.get_release_count(), mem_stat1.get_release_count());
|
||||
}
|
||||
|
||||
} // namespace unittest
|
||||
} // namespace oceanbase
|
||||
}//end of unittest
|
||||
}//end of oceanbase
|
||||
|
||||
using namespace oceanbase;
|
||||
using namespace oceanbase::common;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret = 1;
|
||||
ObLogger& logger = ObLogger::get_logger();
|
||||
ObLogger &logger = ObLogger::get_logger();
|
||||
logger.set_file_name("test_ob_trans_mem_stat.log", true);
|
||||
logger.set_log_level(OB_LOG_LEVEL_INFO);
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user