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 <[email protected]> wrote: > 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: Mocking RMClient responses using > Mockito and via MiniYARNCluster. > > Mockito route requires some refactoring in StreamingAppMasterService. If > we divide execute method in multiple functions, then those can be tested > individually. It gives more flexibility to simulate failure scenarios. > > With MiniYARNCluster, we have a few tests in StreamMiniClusterTest. These > are probably good end-to-end tests. But I don't know if we can set > container launch failures. > > Please suggest which is best way to go :) > > Thanks! > Isha >
