-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31827/
-----------------------------------------------------------
Review request for Ambari and Dmytro Sen.
Bugs: AMBARI-9975
https://issues.apache.org/jira/browse/AMBARI-9975
Repository: ambari
Description
-------
Local maven unit tests are failing on trunk, yet BAO is fine,
<https://builds.apache.org/job/Ambari-trunk-Commit/1880/>
My environment is,
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
I'm on commit 2068caa7ebc029752b0db1eaef1372177e7003ba which corresponds to
AMBARI-9820
Failed tests:
ERROR: testDBConnectionCheck (TestCheckHost.TestCheckHost)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
return func(*args, **keywargs)
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
line 95, in testDBConnectionCheck
checkHost = CheckHost()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/main/resources/custom_actions/scripts/check_host.py",
line 89, in __init__
self.reportFileHandler = HostCheckReportFileHandler()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 39, in __init__
config = self.resolve_ambari_config()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 55, in resolve_ambari_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
ERROR: testHostResolution (TestCheckHost.TestCheckHost)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
return func(*args, **keywargs)
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
line 197, in testHostResolution
checkHost = CheckHost()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/main/resources/custom_actions/scripts/check_host.py",
line 89, in __init__
self.reportFileHandler = HostCheckReportFileHandler()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 39, in __init__
config = self.resolve_ambari_config()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 55, in resolve_ambari_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
ERROR: testInvalidCheck (TestCheckHost.TestCheckHost)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
return func(*args, **keywargs)
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
line 235, in testInvalidCheck
checkHost = CheckHost()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/main/resources/custom_actions/scripts/check_host.py",
line 89, in __init__
self.reportFileHandler = HostCheckReportFileHandler()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 39, in __init__
config = self.resolve_ambari_config()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 55, in resolve_ambari_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
ERROR: testJavaHomeAvailableCheck (TestCheckHost.TestCheckHost)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
return func(*args, **keywargs)
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
line 55, in testJavaHomeAvailableCheck
checkHost = CheckHost()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-server/src/main/resources/custom_actions/scripts/check_host.py",
line 89, in __init__
self.reportFileHandler = HostCheckReportFileHandler()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 39, in __init__
config = self.resolve_ambari_config()
File
"/Users/afernandez/Documents/git/ambari-vagrant/centos6.4/ambari/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py",
line 55, in resolve_ambari_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
Seems to be related to AMBARI-9795
def resolve_ambari_config(self):
try:
config = AmbariConfig()
if os.path.exists(AmbariConfig.getConfigFile()):
config.read(AmbariConfig.getConfigFile())
else:
raise Exception("No config found, use default")
except Exception, err:
logger.warn(err)
return config
Diffs
-----
ambari-server/src/test/python/custom_actions/TestCheckHost.py 101eac9
Diff: https://reviews.apache.org/r/31827/diff/
Testing
-------
mvn clean test
Thanks,
Andrew Onischuk