Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken ut SegmentDeletionRelevantPlaceTest #4607

Merged
merged 9 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbms/src/Flash/Management/tests/gtest_manual_compact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <Poco/Logger.h>
#include <Storages/ColumnsDescription.h>
#include <Storages/DeltaMerge/RowKeyRange.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/DeltaMerge/tests/MultiSegmentTestUtil.h>
#include <Storages/DeltaMerge/tests/dm_basic_include.h>
#include <Storages/StorageDeltaMerge.h>
#include <Storages/tests/TiFlashStorageTestBasic.h>
#include <common/types.h>
Expand Down
1 change: 1 addition & 0 deletions dbms/src/Interpreters/IDAsPathUpgrader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ bool IDAsPathUpgrader::needUpgrade()
if (db_info.engine != "TiFlash")
{
has_old_db_engine = true;
LOG_FMT_INFO(log, "Find old style of database engine, doing upgrade [path={}] [engine={}]", database_metadata_file, db_info.engine);
}
}

Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ macro(grep_gtest_sources BASE_DIR DST_VAR)
endmacro()
# attach all dm gtest sources
grep_gtest_sources(${TiFlash_SOURCE_DIR}/dbms/src/Storages/DeltaMerge/tests dm_gtest_sources)
add_executable(gtests_dm EXCLUDE_FROM_ALL ${dm_gtest_sources} dm_basic_include.h)
add_executable(gtests_dm EXCLUDE_FROM_ALL ${dm_gtest_sources} DMTestEnv.h)
target_link_libraries(gtests_dm gtest_main dbms clickhouse_functions)
add_check(gtests_dm)

Expand Down
5 changes: 2 additions & 3 deletions dbms/src/Storages/DeltaMerge/tests/MultiSegmentTestUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <Storages/DeltaMerge/Range.h>
#include <Storages/DeltaMerge/RowKeyRange.h>
#include <Storages/DeltaMerge/Segment.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/StorageDeltaMerge.h>
#include <Storages/tests/TiFlashStorageTestBasic.h>
#include <TestUtils/TiFlashTestBasic.h>
Expand All @@ -30,7 +31,6 @@
#include <cstdint>
#include <vector>

#include "dm_basic_include.h"

namespace DB
{
Expand All @@ -43,7 +43,6 @@ namespace DM
{
namespace tests
{

/// Helper class to test with multiple segments.
/// You can call `prepareSegments` to prepare multiple segments. After that,
/// you can use `verifyExpectedRowsForAllSegments` to verify the expectation for each segment.
Expand Down Expand Up @@ -157,4 +156,4 @@ class MultiSegmentTestUtil : private boost::noncopyable

} // namespace tests
} // namespace DM
} // namespace DB
} // namespace DB
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <DataTypes/DataTypeString.h>
#include <Poco/File.h>
#include <Storages/DeltaMerge/DeltaMergeStore.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/DeltaMerge/tests/bank/IDGenerator.h>
#include <Storages/DeltaMerge/tests/bank/SimpleDB.h>
#include <Storages/DeltaMerge/tests/dm_basic_include.h>
#include <TestUtils/TiFlashTestBasic.h>

#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/tests/bank/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTLiteral.h>
#include <Storages/DeltaMerge/DeltaMergeStore.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/DeltaMerge/tests/bank/DeltaMergeStoreProxy.h>
#include <Storages/DeltaMerge/tests/dm_basic_include.h>
#include <TestUtils/TiFlashTestBasic.h>

#include <iostream>
Expand Down
3 changes: 1 addition & 2 deletions dbms/src/Storages/DeltaMerge/tests/gtest_convert_column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#include <Storages/DeltaMerge/DeltaMergeDefines.h>
#include <Storages/DeltaMerge/SchemaUpdate.h>
#include <Storages/DeltaMerge/convertColumnTypeHelpers.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/Transaction/TiDB.h>

#include "dm_basic_include.h"

namespace DB
{
namespace DM
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/tests/gtest_data_streams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <DataStreams/BlocksListBlockInputStream.h>
#include <DataStreams/IProfilingBlockInputStream.h>
#include <Storages/DeltaMerge/PKSquashingBlockInputStream.h>
#include <Storages/DeltaMerge/tests/dm_basic_include.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>

namespace DB
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <Storages/DeltaMerge/Filter/RSOperator.h>
#include <Storages/DeltaMerge/PKSquashingBlockInputStream.h>
#include <Storages/DeltaMerge/Segment.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/DeltaMerge/tests/MultiSegmentTestUtil.h>
#include <Storages/tests/TiFlashStorageTestBasic.h>
#include <TestUtils/FunctionTestUtils.h>
#include <TestUtils/TiFlashTestBasic.h>
Expand All @@ -36,9 +38,6 @@
#include <memory>
#include <vector>

#include "MultiSegmentTestUtil.h"
#include "dm_basic_include.h"

namespace DB
{
namespace FailPoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
#include <Storages/DeltaMerge/DeltaMergeStore.h>
#include <Storages/DeltaMerge/File/DMFileBlockOutputStream.h>
#include <Storages/DeltaMerge/Segment.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/Transaction/TMTContext.h>
#include <Storages/tests/TiFlashStorageTestBasic.h>
#include <TestUtils/TiFlashTestBasic.h>

#include <memory>

#include "dm_basic_include.h"

namespace CurrentMetrics
{
extern const Metric DT_SnapshotOfRead;
Expand Down
3 changes: 1 addition & 2 deletions dbms/src/Storages/DeltaMerge/tests/gtest_dm_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
#include <Storages/DeltaMerge/File/DMFileBlockOutputStream.h>
#include <Storages/DeltaMerge/File/DMFileWriter.h>
#include <Storages/DeltaMerge/RowKeyRange.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <Storages/tests/TiFlashStorageTestBasic.h>
#include <TestUtils/FunctionTestUtils.h>

#include <vector>

#include "dm_basic_include.h"

namespace DB
{
namespace FailPoints
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/DeltaMerge/tests/gtest_dm_minmax_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <Storages/DeltaMerge/Index/RoughCheck.h>
#include <Storages/DeltaMerge/Index/ValueComparison.h>
#include <Storages/DeltaMerge/Segment.h>
#include <Storages/DeltaMerge/tests/dm_basic_include.h>
#include <Storages/DeltaMerge/tests/DMTestEnv.h>
#include <TestUtils/TiFlashTestBasic.h>

#include <ctime>
Expand All @@ -41,7 +41,7 @@ static const String DEFAULT_COL_NAME = "2020-09-26";
class DMMinMaxIndexTest : public ::testing::Test
{
public:
DMMinMaxIndexTest() {}
DMMinMaxIndexTest() = default;

protected:
static void SetUpTestCase() {}
Expand Down
Loading