You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/18 13:00:34 UTC

incubator-kylin git commit: fix unit test

Repository: incubator-kylin
Updated Branches:
  refs/heads/1.x-staging 87cf6f32e -> 446bc5c9a


fix unit test

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

Branch: refs/heads/1.x-staging
Commit: 446bc5c9a806acd7878216ca417c97ade4ecba2e
Parents: 87cf6f3
Author: shaofengshi <sh...@apache.org>
Authored: Wed Nov 18 20:00:09 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Nov 18 20:00:09 2015 +0800

----------------------------------------------------------------------
 .../kylin/common/persistence/HBaseResourceStoreTest.java       | 6 ++++++
 .../org/apache/kylin/rest/controller/CubeControllerTest.java   | 2 ++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/446bc5c9/common/src/test/java/org/apache/kylin/common/persistence/HBaseResourceStoreTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/kylin/common/persistence/HBaseResourceStoreTest.java b/common/src/test/java/org/apache/kylin/common/persistence/HBaseResourceStoreTest.java
index 75625fb..b54f413 100644
--- a/common/src/test/java/org/apache/kylin/common/persistence/HBaseResourceStoreTest.java
+++ b/common/src/test/java/org/apache/kylin/common/persistence/HBaseResourceStoreTest.java
@@ -45,11 +45,17 @@ public class HBaseResourceStoreTest extends HBaseMetadataTestCase {
     @Before
     public void setup() throws Exception {
         this.createTestMetadata();
+
+        HadoopUtil.setCurrentConfiguration(null);
+        HadoopUtil.setCurrentHBaseConfiguration(null);
     }
 
     @After
     public void after() throws Exception {
         this.cleanupTestMetadata();
+
+        HadoopUtil.setCurrentConfiguration(null);
+        HadoopUtil.setCurrentHBaseConfiguration(null);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/446bc5c9/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java b/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
index 7a07d66..bb8cb65 100644
--- a/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
+++ b/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
@@ -186,6 +186,7 @@ public class CubeControllerTest extends ServiceTestBase {
         // no signature change
         newCubeDesc.setDescription("hello cube");
         req.setCubeDescData(JsonUtil.writeValueAsIndentString(newCubeDesc));
+        req.setCubeName(newCubeDesc.getName());
         CubeRequest res = cubeController.updateCubeDesc(req);
         Assert.assertTrue(res.getSuccessful());
 
@@ -203,6 +204,7 @@ public class CubeControllerTest extends ServiceTestBase {
         }
         req = new CubeRequest();
         req.setCubeDescData(JsonUtil.writeValueAsIndentString(newCubeDesc));
+        req.setCubeName(newCubeDesc.getName());
         req.setModelDescData(JsonUtil.writeValueAsIndentString(newCubeDesc.getModel()));
         res = cubeController.updateCubeDesc(req);
         Assert.assertTrue(res.getSuccessful());