You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Eric Yang (Resolved) (JIRA)" <ji...@apache.org> on 2011/12/14 08:54:31 UTC

[jira] [Resolved] (AMBARI-162) Agent unit test fail when Ethernet is not in used on MacOSX 10.6

     [ https://issues.apache.org/jira/browse/AMBARI-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Yang resolved AMBARI-162.
------------------------------

    Resolution: Fixed

I just committed this.
                
> Agent unit test fail when Ethernet is not in used on MacOSX 10.6
> ----------------------------------------------------------------
>
>                 Key: AMBARI-162
>                 URL: https://issues.apache.org/jira/browse/AMBARI-162
>             Project: Ambari
>          Issue Type: Bug
>          Components: agent
>    Affects Versions: 0.1.0
>         Environment: MacOSX 10.6
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>             Fix For: 0.1.0
>
>
> Unit test fails when ethernet is not in used on Mac OSX 10.6
> [INFO] --- exec-maven-plugin:1.2:exec (python-test) @ ambari-agent ---
> EE.......
> ======================================================================
> ERROR: test_build (TestHeartbeat.TestHeartbeat)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/test/python/TestHeartbeat.py", line 30, in test_build
>     heartbeat = Heartbeat(actionQueue)
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Heartbeat.py", line 32, in __init__
>     self.hardware = Hardware()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 31, in __init__
>     self.scanNet()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 59, in scanNet
>     switches.get(self.os, self.ethtool)()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 79, in ifconfig
>     self.netSpeed = int(result['output'].rstrip())
> ValueError: invalid literal for int() with base 10: 'media:'
> ======================================================================
> ERROR: test_build (TestHardware.TestHardware)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/test/python/TestHardware.py", line 26, in test_build
>     hardware = Hardware()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 31, in __init__
>     self.scanNet()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 59, in scanNet
>     switches.get(self.os, self.ethtool)()
>   File "/Users/eric/sandbox/ambari/trunk/agent/src/main/python/ambari_agent/Hardware.py", line 79, in ifconfig
>     self.netSpeed = int(result['output'].rstrip())
> ValueError: invalid literal for int() with base 10: 'media:'
> ----------------------------------------------------------------------
> Ran 9 tests in 5.111s
> FAILED (errors=2)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira