kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [16/39] incubator-kylin git commit: KYLIN-711 UT failure in REST module
Date Sun, 26 Apr 2015 04:17:48 GMT
KYLIN-711 UT failure in REST module

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

Branch: refs/heads/staging
Commit: 13f92a2d22ebfa907d823d04017be01365ff434c
Parents: d7d9f03
Author: Shao Feng, Shi <shaoshi@ebay.com>
Authored: Tue Apr 21 18:02:07 2015 +0800
Committer: Shao Feng, Shi <shaoshi@ebay.com>
Committed: Tue Apr 21 21:43:38 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/rest/service/AccessServiceTest.java     | 8 ++++----
 .../java/org/apache/kylin/rest/service/ServiceTestBase.java  | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/13f92a2d/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java b/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
index d3d3c46..402440a 100644
--- a/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
+++ b/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
@@ -58,7 +58,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test init
         acl = accessService.init(ae, AclPermission.ADMINISTRATION);
         Assert.assertTrue(((PrincipalSid) acl.getOwner()).getPrincipal().equals("ADMIN"));
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 1);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 1);
         AccessEntryResponse aer = accessService.generateAceResponses(acl).get(0);
         Assert.assertTrue(aer.getId() != null);
         Assert.assertTrue(aer.getPermission() == AclPermission.ADMINISTRATION);
@@ -67,7 +67,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test grant
         Sid modeler = accessService.getSid("MODELER", true);
         acl = accessService.grant(ae, AclPermission.ADMINISTRATION, modeler);
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 2);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 2);
 
         Long modelerEntryId = null;
         for (AccessControlEntry ace : acl.getEntries()) {
@@ -82,7 +82,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test update
         acl = accessService.update(ae, modelerEntryId, AclPermission.READ);
 
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 2);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 2);
 
         for (AccessControlEntry ace : acl.getEntries()) {
             PrincipalSid sid = (PrincipalSid) ace.getSid();
@@ -108,7 +108,7 @@ public class AccessServiceTest extends ServiceTestBase {
 
         // test revoke
         acl = accessService.revoke(ae, modelerEntryId);
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 1);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 1);
 
         // test clean
         accessService.clean(ae, true);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/13f92a2d/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java b/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
index 5f98767..cc0dfc6 100644
--- a/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
+++ b/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
@@ -19,8 +19,10 @@
 package org.apache.kylin.rest.service;
 
 import org.apache.kylin.common.util.HBaseMetadataTestCase;
+import org.apache.kylin.cube.CubeDescManager;
 import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.dict.DictionaryManager;
+import org.apache.kylin.invertedindex.IIDescManager;
 import org.apache.kylin.invertedindex.IIManager;
 import org.apache.kylin.metadata.MetadataManager;
 import org.apache.kylin.metadata.project.ProjectManager;
@@ -58,7 +60,9 @@ public class ServiceTestBase extends HBaseMetadataTestCase {
 
         MetadataManager.clearCache();
         DictionaryManager.clearCache();
+        CubeDescManager.clearCache();
         CubeManager.clearCache();
+        IIDescManager.clearCache();
         IIManager.clearCache();
         ProjectManager.clearCache();
     }


Mime
View raw message