Be advised, avoiding mocking/stubbing and making your tests "unit
tests" are mutually exclusive. A unit test by definition should not
have any dependencies whatsoever (on other modules even, let alone a
database!).

On Wed, Jul 31, 2013 at 9:41 PM, Wagner Camarao <[email protected]> wrote:
> Hi all ~
>
> Great meetup today - looking forward to upgrading to 1.4
>
> I had a question Mark suggested posting here, then we discussed with a few
> other folks too: How do we unit / integration test persistence with riak?
>
> Given a basic dev environment, e.g. running only one riak physical node
> locally with all configs default, how do we surely read the data we just
> wrote?
>
> I have tried setting DW=all (Durable Write - as recommended for best
> consistency in the financial example from the little riak book - section for
> developers, more than N/R/W) and tried also using {delete_mode, keep} in
> riak_kv app.config (since I truncate the buckets after each test suite), but
> still, I get intermittent test failures as eventually the data isn't
> available for reading right after writing.
>
> Please note I'm trying to avoid mocking / stubbing as well as hacks like
> "keep trying to read" until a certain timeout.
>
> I'm looking ideally for a simple configuration or any known best practices.
>
> Thanks
> ~W
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to