You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2016/04/13 05:28:34 UTC

Review Request 46136: Unit Test Coverage For Alert Caching

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

Review request for Ambari, Nate Cole and Robert Levas.


Bugs: AMBARI-13569
    https://issues.apache.org/jira/browse/AMBARI-13569


Repository: ambari


Description
-------

Add unit tests for the caching of AlertCurrentEntity in the DAO.


Diffs
-----

  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/state/services/CachedAlertFlushServiceTest.java PRE-CREATION 

Diff: https://reviews.apache.org/r/46136/diff/


Testing
-------

mvn clean test


Thanks,

Jonathan Hurley


Re: Review Request 46136: Unit Test Coverage For Alert Caching

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46136/#review128678
-----------------------------------------------------------


Ship it!




Ship It!

- Nate Cole


On April 12, 2016, 11:28 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46136/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 11:28 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Robert Levas.
> 
> 
> Bugs: AMBARI-13569
>     https://issues.apache.org/jira/browse/AMBARI-13569
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add unit tests for the caching of AlertCurrentEntity in the DAO.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/state/services/CachedAlertFlushServiceTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46136/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 46136: Unit Test Coverage For Alert Caching

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On April 13, 2016, 10:45 a.m., Robert Levas wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java, line 47
> > <https://reviews.apache.org/r/46136/diff/1/?file=1342300#file1342300line47>
> >
> >     Why not `extend` `EasyMockSupport`?

Initially, I tried that; but replayAll wasn't working correctly.


> On April 13, 2016, 10:45 a.m., Robert Levas wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java, line 182
> > <https://reviews.apache.org/r/46136/diff/1/?file=1342300#file1342300line182>
> >
> >     If extending EasyMockSupport, than this would be 
> >     
> >     ```
> >     replayAll();
> >     ```

Some mocks are replayed before others; replayAll() seems to cause problems after you've already replayed some.


- Jonathan


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


On April 12, 2016, 11:28 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46136/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 11:28 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Robert Levas.
> 
> 
> Bugs: AMBARI-13569
>     https://issues.apache.org/jira/browse/AMBARI-13569
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add unit tests for the caching of AlertCurrentEntity in the DAO.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/state/services/CachedAlertFlushServiceTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46136/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 46136: Unit Test Coverage For Alert Caching

Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46136/#review128682
-----------------------------------------------------------


Ship it!





ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java (line 47)
<https://reviews.apache.org/r/46136/#comment192146>

    Why not `extend` `EasyMockSupport`?



ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java (line 182)
<https://reviews.apache.org/r/46136/#comment192147>

    If extending EasyMockSupport, than this would be 
    
    ```
    replayAll();
    ```


- Robert Levas


On April 12, 2016, 11:28 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46136/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 11:28 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Robert Levas.
> 
> 
> Bugs: AMBARI-13569
>     https://issues.apache.org/jira/browse/AMBARI-13569
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add unit tests for the caching of AlertCurrentEntity in the DAO.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOCachedTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/state/services/CachedAlertFlushServiceTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46136/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>