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

Fix an unit test failure on ambari-metrics-common

    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-common/pom.xml
      
      ...
      
      Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.411 sec <<< FAILURE! - in org.apache.hadoop.metrics2.sink.timeline.availability.MetricCollectorHATest
      testEmbeddedModeCollectorZK(org.apache.hadoop.metrics2.sink.timeline.availability.MetricCollectorHATest)  Time elapsed: 0.007 sec  <<< ERROR!
      java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      	at org.apache.hadoop.metrics2.sink.timeline.availability.MetricCollectorHATest.testEmbeddedModeCollectorZK(MetricCollectorHATest.java:88)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      	at org.apache.hadoop.metrics2.sink.timeline.availability.MetricCollectorHATest.testEmbeddedModeCollectorZK(MetricCollectorHATest.java:88)
      
      
      Results :
      
      Tests in error: 
        MetricCollectorHATest.testEmbeddedModeCollectorZK:88 ยป NoClassDefFound org/slf...
      
      Tests run: 20, Failures: 0, Errors: 1, Skipped: 0
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  35.496 s
      [INFO] Finished at: 2023-02-24T09:54:00+09:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project ambari-metrics-common: There are test failures.
      

      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: