Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2D0AB200C18 for ; Sat, 11 Feb 2017 10:17:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2B883160B5D; Sat, 11 Feb 2017 09:17:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7401F160B51 for ; Sat, 11 Feb 2017 10:17:45 +0100 (CET) Received: (qmail 97462 invoked by uid 500); 11 Feb 2017 09:17:44 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 97450 invoked by uid 99); 11 Feb 2017 09:17:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Feb 2017 09:17:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 48F3A183A61 for ; Sat, 11 Feb 2017 09:17:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Nl5QOY4j_AYm for ; Sat, 11 Feb 2017 09:17:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 058175F1B3 for ; Sat, 11 Feb 2017 09:17:43 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DFBBDE012C for ; Sat, 11 Feb 2017 09:17:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 999EE21D61 for ; Sat, 11 Feb 2017 09:17:41 +0000 (UTC) Date: Sat, 11 Feb 2017 09:17:41 +0000 (UTC) From: "Dmytro Sen (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-19944) Increase SNMP Unit Test Coverage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 11 Feb 2017 09:17:46 -0000 [ https://issues.apache.org/jira/browse/AMBARI-19944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmytro Sen updated AMBARI-19944: -------------------------------- Status: Open (was: Patch Available) > Increase SNMP Unit Test Coverage > -------------------------------- > > Key: AMBARI-19944 > URL: https://issues.apache.org/jira/browse/AMBARI-19944 > Project: Ambari > Issue Type: Task > Components: alerts, test > Affects Versions: 2.5.0 > Reporter: Dmytro Sen > Assignee: Dmytro Sen > Fix For: 2.5.0 > > Attachments: AMBARI-19944_3.patch, AMBARI-19944.patch > > > 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 -- This message was sent by Atlassian JIRA (v6.3.15#6346)