[refactor] Unify all unit tests into one binary file (#8958)

1. solved the previous delayed unit test file size is too large (1.7G+) and the unit test link time is too long problem problems
2. Unify all unit tests into one file to significantly reduce unit test execution time to less than 3 mins
3. temporarily disable stream_load_test.cpp, metrics_action_test.cpp, load_channel_mgr_test.cpp because it will re-implement part of the code and affect other tests
This commit is contained in:
Zhengguo Yang
2022-04-12 15:30:40 +08:00
committed by GitHub
parent 66d2f4e1fd
commit 5a44eeaf62
349 changed files with 11447 additions and 14604 deletions

View File

@ -81,7 +81,7 @@ TEST(ComparisonTest, ComparisonFunctionTest) {
k2 = 100;
for (int i = 0; i < 1024; ++i, k1++, k2--) {
vectorized::ColumnPtr column = block.get_columns()[3];
ASSERT_EQ(column->get_bool(i), k1 > k2);
EXPECT_EQ(column->get_bool(i), k1 > k2);
}
// 2. compute the k2 <= k3
@ -100,7 +100,7 @@ TEST(ComparisonTest, ComparisonFunctionTest) {
k3 = 7.7;
for (int i = 0; i < 1024; ++i, k3 += 0.1, k2--) {
vectorized::ColumnPtr column = block.get_columns()[4];
ASSERT_EQ(column->get_bool(i), k2 <= k3);
EXPECT_EQ(column->get_bool(i), k2 <= k3);
}
num_columns_without_result = block.columns();
@ -119,7 +119,7 @@ TEST(ComparisonTest, ComparisonFunctionTest) {
k3 = 7.7;
for (int i = 0; i < 1024; ++i, k1++, k3 += 0.1, k2--) {
vectorized::ColumnPtr column = block.get_columns()[5];
ASSERT_EQ(column->get_bool(i), k1 > k2 and k2 <= k3);
EXPECT_EQ(column->get_bool(i), k1 > k2 and k2 <= k3);
}
num_columns_without_result = block.columns();
@ -137,13 +137,8 @@ TEST(ComparisonTest, ComparisonFunctionTest) {
k3 = 7.7;
for (int i = 0; i < 1024; ++i, k1++, k3 += 0.1, k2--) {
vectorized::ColumnPtr column = block.get_columns()[6];
ASSERT_EQ(column->get_bool(i), k1 > k2 or k2 <= k3);
EXPECT_EQ(column->get_bool(i), k1 > k2 or k2 <= k3);
}
}
} // namespace doris
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}