[MDS/DeadLock] remove uniittest file included in src dir

This commit is contained in:
fengdeyiji
2023-08-30 08:10:49 +00:00
committed by ob-robot
parent b9d0639eb7
commit 0528277691
22 changed files with 7 additions and 27 deletions

View File

@ -23,7 +23,7 @@
#include "share/deadlock/ob_lcl_scheme/ob_lcl_message.h"
#include "lib/function/ob_function.h"
#include "common/ob_clock_generator.h"
#include "share/deadlock/test_key.h"
#include "share/deadlock/test/test_key.h"
#include <string>
#include <iostream>
#include <thread>

View File

@ -1,68 +0,0 @@
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef UNITTEST_DEADLOCK_TEST_KEY_H
#define UNITTEST_DEADLOCK_TEST_KEY_H
#include "lib/utility/ob_unify_serialize.h"
#include "lib/oblog/ob_log_module.h"
#include "lib/ob_errno.h"
#include "lib/utility/serialization.h"
namespace oceanbase {
namespace unittest {
class ObDeadLockTestIntKey {
OB_UNIS_VERSION(1);
public:
ObDeadLockTestIntKey() : v_(-1) {};
ObDeadLockTestIntKey(int v) : v_(v) {};
bool is_valid() const { return true; }
TO_STRING_KV(K_(v));
int get_value() const { return v_; }
private:
int v_;
};
class ObDeadLockTestDoubleKey {
OB_UNIS_VERSION(1);
public:
ObDeadLockTestDoubleKey() : v_(0.0) {};
ObDeadLockTestDoubleKey(double v) : v_(v) {};
bool is_valid() const { return true; }
TO_STRING_KV(K_(v));
private:
double v_;
};
inline int ObDeadLockTestIntKey::serialize(char *buf, const int64_t buf_len, int64_t &pos) const {
return common::serialization::encode(buf, buf_len, pos, v_);
}
inline int ObDeadLockTestIntKey::deserialize(const char *buf, const int64_t data_len, int64_t &pos) {
return common::serialization::decode(buf, data_len, pos, v_);
}
inline int64_t ObDeadLockTestIntKey::get_serialize_size(void) const {
return common::serialization::encoded_length(v_);
}
inline int ObDeadLockTestDoubleKey::serialize(char *buf, const int64_t buf_len, int64_t &pos) const {
return common::serialization::encode(buf, buf_len, pos, v_);
}
inline int ObDeadLockTestDoubleKey::deserialize(const char *buf, const int64_t data_len, int64_t &pos) {
return common::serialization::decode(buf, data_len, pos, v_);
}
inline int64_t ObDeadLockTestDoubleKey::get_serialize_size(void) const {
return common::serialization::encoded_length(v_);
}
}
}
#endif

View File

@ -12,7 +12,7 @@
#include "share/deadlock/ob_deadlock_key_wrapper.h"
#include "share/deadlock/ob_deadlock_detector_mgr.h"
#include "test_key.h"
#include "share/deadlock/test/test_key.h"
#include <gtest/gtest.h>
#include <gmock/gmock.h>

View File

@ -16,7 +16,7 @@
#define protected public
#include "share/deadlock/ob_deadlock_key_wrapper.h"
#include "share/deadlock/ob_deadlock_detector_mgr.h"
#include "test_key.h"
#include "share/deadlock/test/test_key.h"
#include <string>
#include <iostream>
#include <thread>