You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/11/09 14:15:44 UTC

[2/2] ambari git commit: AMBARI-13789. Fix unit tests failures on Mac (aonishuk)

AMBARI-13789. Fix unit tests failures on Mac (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 4e4112423ef76bcb5e695b17fbe5d0fbaa650d94
Parents: aaeac45
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Nov 9 15:15:34 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Nov 9 15:15:34 2015 +0200

----------------------------------------------------------------------
 ambari-server/src/test/python/stacks/utils/RMFTestCase.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4e411242/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
index 0420161..ca32649 100644
--- a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
+++ b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
@@ -113,12 +113,11 @@ class RMFTestCase(TestCase):
     try:
       with patch.object(platform, 'linux_distribution', return_value=os_type):
         script_module = imp.load_source(classname, script_path)
+        script_class_inst = RMFTestCase._get_attr(script_module, classname)()
+        method = RMFTestCase._get_attr(script_class_inst, command)
     except IOError, err:
       raise RuntimeError("Cannot load class %s from %s: %s" % (classname, norm_path, err.message))
     
-    script_class_inst = RMFTestCase._get_attr(script_module, classname)()
-    method = RMFTestCase._get_attr(script_class_inst, command)
-    
     # Reload params import, otherwise it won't change properties during next import
     if 'params' in sys.modules:  
       del(sys.modules["params"])