Hey Sean,

Thanks for the suggestion. I've spent a few hours trying to get this up and 
running and I'm having a bit of a hard time. Is there any documentation around 
Riak::TestServer?

What are the configuration values for :source and :root supposed to be exactly? 
As I understand it, :root should be something like /path/to/riak/bin and source 
should be something like /path/to/riak. Is that correct? Also, how does Riak:: 
TestServer#create behave exactly?

In our dev environments we have a Riak configuration that includes config files 
and binaries that our dev's can just git clone so they can get started quickly. 
It is very similar to what the following docs outline only with three nodes 
instead of one: https://wiki.basho.com/Building-a-Development-Environment.html

What I'd really like to set up is a way for Riak::TestServer to use the same 
binaries as our dev riak config, but a different configuration (app.config, 
vm.args, etc.). Is this possible? Alternatively, we could stick a copy of the 
Riak binaries directly in the repo that is using Ripple to make it a bit more 
standalone.

What is the configuration you were anticipating when you wrote the 
Riak::TestServer class?

Thanks,
Brad Heller

On Sep 7, 2012, at 5:02 AM, Sean Cribbs <s...@basho.com> wrote:

> If it's only for your test suite, use a local memory-only node via the
> Ripple::TestServer. If you configure it correctly (there's a bundled
> Rails generator that helps), it will delete all the contents of Riak
> in one fell-swoop after or before each test/example.
> 
> On Fri, Sep 7, 2012 at 2:49 AM, Brad Heller <b...@cloudability.com> wrote:
>> Hey all,
>> 
>> So we're rolling out Riak more and more and so far, so good. In fact we're
>> starting to accumulate a pretty sizable test suite of our data access layer.
>> To support this we've written some code that helps clean out buckets between
>> test runs. We're using Ruby (ripple + ruby-risk-client, obviously) so we
>> just monkey patch the bucket object and detect if it was used or not.
>> 
>> If it was used during a test, we iterate over all the keys and delete each
>> one. We're cognizant of the risks in doing this for large clusters, but in
>> our test enviro the number of documents per test is pretty small and the
>> operations themselves are quite fast.
>> 
>> The problem we're having, though, is that when we run the full suite (or a
>> large subset of the suite) all at once the churn in Riak seems to be so
>> quick that sometimes Riak isn't quite in the state that we expect it to be
>> in when the test runs! For instance, we have a test that checks that the
>> right number of linked documents are created when a given object is saved.
>> If we run the test by itself everything works fine--the expectation that 10
>> documents are created indeed checks out. If we run this test as part of a
>> large suite of tests, the expectation fails and sometimes 11 documents or 12
>> documents appear (we check by counting the keys in the linked bucket).
>> 
>> I would think that this has something to do with Riak's eventually
>> consistent delete operation, but wanted to tap in to the brain trust: Is
>> there any tuning we can do in test to prevent this?
>> 
>> Thanks,
>> 
>> Brad Heller | Engineering Lead | Cloudability.com | 541-231-1514 | Skype:
>> brad.heller | @bradhe | @cloudability
>> 
>> We're hiring! http://cloudability.com/jobs
>> 
>> 
>> _______________________________________________
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> 
> 
> 
> 
> -- 
> Sean Cribbs <s...@basho.com>
> Software Engineer
> Basho Technologies, Inc.
> http://basho.com/

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to