diff --git a/be/test/olap/memory/column_test.cpp b/be/test/olap/memory/column_test.cpp index d5c3dab288..0033fecc37 100644 --- a/be/test/olap/memory/column_test.cpp +++ b/be/test/olap/memory/column_test.cpp @@ -47,7 +47,9 @@ struct ColumnTest { scoped_refptr newc; ASSERT_TRUE(writer->finalize(2).ok()); ASSERT_TRUE(writer->get_new_column(&newc).ok()); - if (!AllowSlowTests()) { + // The less `InsertCount` won't make COW performed, + // expect the new column object only when inserting more。 + if (AllowSlowTests()) { EXPECT_TRUE(c.get() != newc.get()); } std::unique_ptr readc; @@ -76,7 +78,7 @@ struct ColumnTest { scoped_refptr newc; ASSERT_TRUE(writer->finalize(2).ok()); ASSERT_TRUE(writer->get_new_column(&newc).ok()); - if (!AllowSlowTests()) { + if (AllowSlowTests()) { EXPECT_TRUE(c.get() != newc.get()); } std::unique_ptr readc; diff --git a/be/test/test_util/test_util.h b/be/test/test_util/test_util.h index 197ed23aee..49af157917 100644 --- a/be/test/test_util/test_util.h +++ b/be/test/test_util/test_util.h @@ -19,7 +19,7 @@ namespace doris { -#define LOOP_LESS_OR_MORE(less, more) (AllowSlowTests() ? less : more) +#define LOOP_LESS_OR_MORE(less, more) (AllowSlowTests() ? more : less) // Get the value of an environment variable that has boolean semantics. bool GetBooleanEnvironmentVariable(const char* env_var_name);