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

Increase SNMP Unit Test Coverage

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • alerts, test
    • None

    Description

      The current unit tests for SNMP alert notifications do not provide enough of an end-to-end coverage there should be. We should mock SNMP4J classes to ensure that the alert framework is capable of completing an end-to-end dispatch of a trap. This includes:
      Instrumenting the SNMP4J dispatcher to intercept the SNMP message and validating the OIDs stored
      Instrumenting Ambari alert code so that an AlertNotice is picked up and converted into a delivered SNMP message.
      This unit test needs to cover test cases:
      4 Verify AMBARI_SNMP trap is working fine when alerts are triggered (Need to confirm whether covered in unit tests)
      1 Setup a SNMP trap receiver server on one of the hosts
      2 Create AMBARI_SNMP trap notification to use the receiver started in Step 1
      3 Trigger an alert to be in CRIT status. E.g STOP MR to trigger HistoryServer Alert
      4 Verify the traps are received by the receiver and verify the OID received is correct

      Attachments

        1. AMBARI-19944.patch
          10 kB
          Dmytro Sen
        2. AMBARI-19944_3.patch
          11 kB
          Dmytro Sen

        Issue Links

          Activity

            People

              dsen Dmytro Sen
              dsen Dmytro Sen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: