Responses inline. --- Jeremiah Peschka - Founder, Brent Ozar Unlimited MCITP: SQL Server 2008, MVP Cloudera Certified Developer for Apache Hadoop
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? > Carefully and in isolation. ;) > > 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? > This will depend, in part, on what you're trying to test and how you want the application to behave. I test everything with 5 Riak processes running on one machine, so it's very doable, you just have to recognize that performance will be Not Good™. If you're doing a put immediately followed by a get in the same process, I'd consider using return_body instead of issuing a separate get. Otherwise, a general best practice is to make sure R + W > N > > 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. > Developing the .NET client, our integration tests create bucket names using GUIDs so we can avoid any kind of spookiness around deletes. I just want to test how the client will behave in a known situation. Truncating buckets definitely falls into the category of weird behavior that you probably won't observe in production. > > 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
