kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject kylin git commit: minor, fix CI
Date Tue, 01 Mar 2016 10:41:52 GMT
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging ca5979554 -> 098a8532f


minor, fix CI


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

Branch: refs/heads/2.x-staging
Commit: 098a8532f65562644b9b54b465ce23fbed904269
Parents: ca59795
Author: Hongbin Ma <mahongbin@apache.org>
Authored: Tue Mar 1 18:41:33 2016 +0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Tue Mar 1 18:41:33 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/query/ITKylinQueryTest.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/098a8532/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 fa71db2..fd88452 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
@@ -25,12 +25,14 @@ import java.sql.DriverManager;
 import java.util.List;
 import java.util.Properties;
 
+import net.sf.ehcache.CacheManager;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.metadata.project.ProjectInstance;
 import org.apache.kylin.query.enumerator.OLAPQuery;
 import org.apache.kylin.query.relnode.OLAPContext;
 import org.apache.kylin.query.schema.OLAPSchemaFactory;
+import org.apache.kylin.storage.cache.AbstractCacheFledgedQuery;
 import org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer.ObserverEnabler;
 import org.apache.kylin.common.util.HBaseMetadataTestCase;
 import org.dbunit.database.DatabaseConnection;
@@ -42,6 +44,8 @@ import org.junit.Test;
 
 @Ignore("KylinQueryTest is contained by ITCombinationTest")
 public class ITKylinQueryTest extends KylinTestBase {
+    private static CacheManager cacheManager;
+
 
     @BeforeClass
     public static void setUp() throws Exception {
@@ -74,6 +78,9 @@ public class ITKylinQueryTest extends KylinTestBase {
         // Load H2 Tables (inner join)
         H2Database h2DB = new H2Database(h2Connection, config);
         h2DB.loadAllTables();
+
+        cacheManager = CacheManager.newInstance("../server/src/main/resources/ehcache-test.xml");
+        AbstractCacheFledgedQuery.setCacheManager(cacheManager);
     }
 
     protected static void clean() {
@@ -84,6 +91,11 @@ public class ITKylinQueryTest extends KylinTestBase {
 
         ObserverEnabler.forceCoprocessorUnset();
         HBaseMetadataTestCase.staticCleanupTestMetadata();
+
+        if (cacheManager != null) {
+            cacheManager.shutdown();
+        }
+        AbstractCacheFledgedQuery.setCacheManager(null);
     }
 
     @Ignore("this is only for debug")
@@ -237,7 +249,7 @@ public class ITKylinQueryTest extends KylinTestBase {
 
     @Test
     public void testTopNQuery() throws Exception {
-            if ("left".equalsIgnoreCase(joinType)) {
+        if ("left".equalsIgnoreCase(joinType)) {
             this.execAndCompQuery("src/test/resources/query/sql_topn", null, true);
         }
     }


Mime
View raw message