You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/27 06:30:00 UTC

[GitHub] merlimat opened a new pull request #1209: Added MockBookKeeper for unit tests

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:
users@infra.apache.org


With regards,
Apache Git Services