This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e1a80b  [UT][Bug] fix LOOP_LESS_OR_MORE (#5157)
5e1a80b is described below

commit 5e1a80bb22fce7fc08aac4105ffee2543926d16d
Author: HuangWei <huang...@apache.org>
AuthorDate: Tue Dec 29 09:48:19 2020 +0800

    [UT][Bug] fix LOOP_LESS_OR_MORE (#5157)
    
    This bug introduced by #5131. When AllowSlowTests() is true, we should loop 
more.
---
 be/test/olap/memory/column_test.cpp | 6 ++++--
 be/test/test_util/test_util.h       | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/be/test/olap/memory/column_test.cpp 
b/be/test/olap/memory/column_test.cpp
index d5c3dab..0033fec 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<Column> 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<ColumnReader> readc;
@@ -76,7 +78,7 @@ struct ColumnTest {
         scoped_refptr<Column> 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<ColumnReader> readc;
diff --git a/be/test/test_util/test_util.h b/be/test/test_util/test_util.h
index 197ed23..49af157 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);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to