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

Fix an unit test failure on ambari-metrics-host-monitoring

    XMLWordPrintableJSON

Details

    Description

      I tried to run unit tests on the release-2.0.0-rc0 branch and ran into the following error:

      $ mvn test -f ambari-metrics-host-monitoring/pom.xml
      
      ...
      
      [INFO] --- exec-maven-plugin:1.2.1:exec (python-test) @ ambari-metrics-host-monitoring ---
      Running tests
      No handlers could be found for logger "root"
      Traceback (most recent call last):
        File "unitTests.py", line 137, in <module>
          sys.exit(main())
        File "unitTests.py", line 106, in main
          modules]
        File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
          module = __import__('.'.join(parts_copy))
        File "/home/sekikn/repos/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py", line 24, in <module>
          from core.application_metric_map import ApplicationMetricMap
        File "/home/sekikn/repos/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/__init__.py", line 29, in <module>
          for dir in os.walk(path).next()[1]:
      StopIteration
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  1.126 s
      [INFO] Finished at: 2023-02-24T09:45:36+09:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (python-test) on project ambari-metrics-host-monitoring: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
      

      Attachments

        Issue Links

          Activity

            People

              sekikn Kengo Seki
              sekikn Kengo Seki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: