basho/riak_test — pull request #143 by beerriot (2013-01-07 21:36:04+00:00)
Title: Convert riak_pipe eunit system tests to riak_test

A belated New Years gift for @joedevivo: Riak Pipe's hairy eunit tests converted to riak_test.

This relies on https://github.com/basho/riak_pipe/commit/470900212f1efbc2e484c8a84db11ed85e6c9aad from the `bwf-riak_test` branch of `riak_pipe`, to export `riak_pipe:zero_part/1`

This will allow us to remove the fragile setup/teardown logic in the riak_pipe module.

```
riak_test module <- riak_pipe eunit test
-------------------------------
pipe_verify_examples <- half of riak_pipe:basic_test_
pipe_verify_basics <- other half of riak_pipe:basic_test_
pipe_verify_exceptions <- riak_pipe:exception_test_
pipe_verify_handoff <- riak_pipe:limits_test_
pipe_verify_sink_types <- riak_pipe:sink_type_test_
```

Things I'm not entirely happy with, but which work:

1. lots of rpc calls … kind of necessary, since pipe has no direct external interface

1. lots of module injection … also kind of necessary, since we need the module from riak_test available on the cluster

1. the cluster is not reset for each test … it would be trivial to change that, but would slow the tests significantly

1. the handoff test had to be rewritten significantly … but I'm not sure it was actually working in its eunit state

1. the choice of cluster size … everything except the handoff test was running with 1 node in eunit mode; I change to three nodes in most tests here just because I could so easily; exception being pipe_verify_exceptions because verify_worker_restart_failure_input_forwarding/1 uses ETS table heirs (which don't work cross-node) to track restarts