merlimat opened a new pull request #1209: Added MockBookKeeper for unit tests
URL: https://github.com/apache/bookkeeper/pull/1209
 
 
   This mock class is what we use in Pulsar to do unit tests for the 
managed-ledger library. 
   
   This approach might be useful in general, in all cases when creating unit 
tests of an application that uses the BookKeeper API. 
   
   The `MockBookKeeper` behaves like the regular BK client, except it needs no 
bookies or zookkeeper. All ledgers and data are just kept in an hashmap in 
memory.
   
   It is possible to inject failure in the sync/async calls, even after N 
steps. This is very useful to trigger failure in complex operations and cover 
this paths in unit tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to