> On Feb. 9, 2017, 11:16 a.m., Jonathan Hurley wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java,
> >  lines 352-354
> > <https://reviews.apache.org/r/56501/diff/1/?file=1628573#file1628573line352>
> >
> >     Can you compare the collections instead - would probably be cleaner to 
> > see?
> 
> Dmytro Sen wrote:
>     Does the strings collection is enough?

Well, let's say there is a discrepency between the two strings. It's kind of 
hard to see what parts are different. I just thought that maybe comparing OID  
to OID would have been cleaner/easier to debug.


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56501/#review164932
-----------------------------------------------------------


On Feb. 9, 2017, 11:34 a.m., Dmytro Sen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56501/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2017, 11:34 a.m.)
> 
> 
> Review request for Ambari and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-19944
>     https://issues.apache.org/jira/browse/AMBARI-19944
> 
> 
> Repository: ambari
> 
> 
> 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
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java
>  07094a8 
> 
> Diff: https://reviews.apache.org/r/56501/diff/
> 
> 
> Testing
> -------
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>

Reply via email to