Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-162

Agent unit test fail when Ethernet is not in used on MacOSX 10.6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.1.0
    • 0.1.0
    • ambari-agent
    • None
    • MacOSX 10.6

    Description

      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)

      Attachments

        Activity

          People

            eyang Eric Yang
            eyang Eric Yang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: