basho/riak_test — pull request #663 by kellymclaughlin (2014-07-15 23:03:58+00:00)
Title: Feature/sc overload testing

Change the overload test to exercise the strongly consistent code paths in addition to the eventually consistent paths during overload conditions.

This PR includes some refactoring of the test to better organize it for code reuse between the testing for SC and EC and to allow certain test cases to be selectively run. The coverage testing has also been broken out into a separate test case for clarity.

This also adds a `pbc/2` function to the `rt` module to allow custom options to be specified when establishing a protocol buffers connection.

One of the goals for this change was to enable the removal of the very stateful [overload unit test suite](https://github.com/basho/riak_core/blob/develop/src/riak_core_vnode_proxy.erl#L339) in the `riak_core_vnode_proxy` module. Another goal was to increase the code coverage of the overload code over the existing tests. I believe both of those goals are achieved with this set of changes and plan to open a PR for the removal of the `riak_core_vnode_proxy` test suite in the near future.

I have annotated the `overload` test module to specify cover analysis for three modules: `riak_core_vnode_proxy`, `riak_kv_vnode`, and `riak_kv_ensemble_backend`. The following shows the current state of coverage for these modules:

![overload-coverage-master](https://cloud.githubusercontent.com/assets/29337/3592550/dd11574a-0c73-11e4-9994-ee88fd96ff58.png)

Now the coverage using the changes represented in this PR:

![overload-coverage-new](https://cloud.githubusercontent.com/assets/29337/3592551/dfb28b5e-0c73-11e4-8067-02d172527dae.png)

I would request the reviewer to generate the coverage reports for themselves and examine the per module changes in greater detail. I am available for help in configuring riak_test to run the cover server if needed.