You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/01/31 13:02:02 UTC

[35/50] incubator-kylin git commit: simply cache clearing, bug fix

simply cache clearing, bug fix


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

Branch: refs/heads/inverted-index
Commit: 9e0e8fb0a6a70753c9f74a3d238bfdf155177db6
Parents: 29632f5
Author: Li, Yang <ya...@ebay.com>
Authored: Thu Jan 29 13:42:44 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Thu Jan 29 13:42:44 2015 +0800

----------------------------------------------------------------------
 .../kylinolap/common/util/AbstractKylinTestCase.java  | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/9e0e8fb0/common/src/main/java/com/kylinolap/common/util/AbstractKylinTestCase.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/com/kylinolap/common/util/AbstractKylinTestCase.java b/common/src/main/java/com/kylinolap/common/util/AbstractKylinTestCase.java
index fdbe0e0..51f7f4e 100644
--- a/common/src/main/java/com/kylinolap/common/util/AbstractKylinTestCase.java
+++ b/common/src/main/java/com/kylinolap/common/util/AbstractKylinTestCase.java
@@ -62,21 +62,11 @@ public abstract class AbstractKylinTestCase {
 
     private static void cleanupCache() {
 
-        KylinConfig config = null;
-
-        try {
-            config = KylinConfig.getInstanceFromEnv();
-        } catch (Exception e) {
-            // do nothing.
-        }
-        if (config == null) // there is no Kylin config in current env.
-            return;
-
         for (String serviceClass : SERVICES_WITH_CACHE) {
             try {
                 Class<?> cls = Class.forName(serviceClass);
-                Method method = cls.getDeclaredMethod("removeInstance", KylinConfig.class);
-                method.invoke(null, config);
+                Method method = cls.getDeclaredMethod("clearCache");
+                method.invoke(null);
             } catch (ClassNotFoundException e) {
                 // acceptable because lower module test does have CubeManager etc on classpath
             } catch (Exception e) {