Re: StreamingAppMasterService Unit testing

2015-10-06 Thread Isha Arkatkar
Hi , I went ahead with Mockito for testing StreamingAppMasterService to check blacklisting of consecutively failing nodes. Here is a pull request for the same: https://github.com/apache/incubator-apex-core/pull/98 Mockito was fairly easy to use for for mocking responses from Hadoop APIs and

Re: StreamingAppMasterService Unit testing

2015-09-30 Thread Isha Arkatkar
I was thinking of mocking the calls that we make during allocation. E.g. RegisterApplicationMasterResponse, AMRMClient.allocate call, AllocateResponse returned etc.. But yes, if there is any supporting library for the same, it would be very useful! Isha On Wed, Sep 30, 2015 at 1:26 PM, Pramod Imm

Re: StreamingAppMasterService Unit testing

2015-09-30 Thread Pramod Immaneni
Would going to Mockito route mean we have to keep up with the RMClient protocol and handle generation of responses ourselves, are there any supporting libraries in hadoop that would help us with that. On Wed, Sep 30, 2015 at 12:36 PM, Isha Arkatkar wrote: > Hi all, > >I want to add some

StreamingAppMasterService Unit testing

2015-09-30 Thread Isha Arkatkar
Hi all, I want to add some unit testing for container allocation flow in StreamingAppMasterService class. Some of the scenarios like consecutive node failures etc. are hard to simulate manually and would be nice to cover that through unit testing. I am right now exploring 2 options: Mo