This test makes me a bit uneasy.  We have had a lot of issues in riak_kv because of tests like this that stand up a limited part of riak.  It may work 100% of the time now but in the future as we add more tests, especially more tests that stand up bits of riak, then making sure to fully tear things down becomes very very important.  Eunit has non-deterministic run order on different platforms and this has bitten us many times because most of us work on OSX and as tests like these get crufty we start relying on side effects of previous tests  (although perhaps we can get around this by spawning nodes for each test, or maybe CT is better at this tuff).

Also, this is a lot of code to test 2 lines of code.  Granted, it is important code to test, but if set_index_flag ever breaks it should be obvious (famous last words).  Perhaps adding a check to yokozuna_essential that makes sure the bucket flag is set would be wise?  In fact, most of this test is really making sure setting bucket properties works.  But I believe that is something that should be tested in riak_core and left as a black box in Yokozuna.

All that said, if you feel strongly about this test, we can leave it in.  But if it gives us any troubles I will immediately remove it.