kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: minor, CI for prepare only toggle
Date Wed, 14 Jun 2017 12:30:41 GMT
Repository: kylin
Updated Branches:
  refs/heads/2.0.x ac38a2e05 -> c6a264411


minor, CI for prepare only toggle


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/c6a26441
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/c6a26441
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/c6a26441

Branch: refs/heads/2.0.x
Commit: c6a264411feaee8ed7b2e7ca6eaf89c14f8a69a1
Parents: ac38a2e
Author: Li Yang <liyang@apache.org>
Authored: Wed Jun 14 20:30:20 2017 +0800
Committer: Li Yang <liyang@apache.org>
Committed: Wed Jun 14 20:30:20 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/query/ITKylinQueryTest.java     | 15 +++++++++++++++
 .../java/org/apache/kylin/query/KylinTestBase.java   |  5 ++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c6a26441/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 7a0af10..43d9ffc 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -200,6 +200,21 @@ public class ITKylinQueryTest extends KylinTestBase {
     }
 
     @Test
+    public void testVerifyCountQueryWithPrepare() throws Exception {
+        try {
+            Map<String, String> toggles = Maps.newHashMap();
+            toggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, "true");
+            BackdoorToggles.setToggles(toggles);
+            
+            verifyResultRowColCount(getQueryFolderPrefix() + "src/test/resources/query/sql_verifyCount");
+            
+        } finally {
+            BackdoorToggles.cleanToggles();
+            
+        }
+    }
+    
+    @Test
     public void testVerifyContentQuery() throws Exception {
         verifyResultContent(getQueryFolderPrefix() + "src/test/resources/query/sql_verifyContent");
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/c6a26441/kylin-it/src/test/java/org/apache/kylin/query/KylinTestBase.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/KylinTestBase.java b/kylin-it/src/test/java/org/apache/kylin/query/KylinTestBase.java
index 2174094..503cb40 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/KylinTestBase.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/KylinTestBase.java
@@ -44,6 +44,7 @@ import java.util.logging.LogManager;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.common.debug.BackdoorToggles;
 import org.apache.kylin.common.util.HBaseMetadataTestCase;
 import org.apache.kylin.common.util.Pair;
 import org.apache.kylin.metadata.project.ProjectInstance;
@@ -355,7 +356,9 @@ public class KylinTestBase {
             ITable kylinTable = executeQuery(kylinConn, queryName, sql, false);
 
             // compare the result
-            if (expectRowCount >= 0)
+            if (BackdoorToggles.getPrepareOnly())
+                Assert.assertEquals(queryName, 0, kylinTable.getRowCount());
+            else if (expectRowCount >= 0)
                 Assert.assertEquals(queryName, expectRowCount, kylinTable.getRowCount());
 
             if (expectColCount >= 0)


Mime
View raw message