This PR includes a quickcheck property for riak_pipe_fitting, as well as a fix for a small bug it found.
The riak_pipe_fitting_eqc:prop_eoi/0 property is an attempt to test riak_pipe_fitting's behavior during eoi propagation. The test sets up a fitting process, then starts zero or more [fake] vnodes, then maybe sends eoi to the fitting, then starts zero or more additional vnodes. All vnodes that receive a #fitting_details{} reply from the fitting are expected to also receive eoi messages from the fitting. The sink should also receive an eoi.
The bug had to do with wether the fitting was still up before gen_fsm calls were made against it. We were already catching noproc exits, which is what happened when the fitting was down before the call. In testing, normal exits were also encountered when the fitting was up before the the call, but then exited before replying. The patch catches all exits now.
The property can be run by eqc:quickcheck(riak_pipe_fitting_eqc:prop_eoi()) or eqc:module(riak_pipe_fitting_eqc), or by rebar qc if you have a new enough rebar. An eunit hook should be added before merge.
This PR includes a quickcheck property for
riak_pipe_fitting
, as well as a fix for a small bug it found.The
riak_pipe_fitting_eqc:prop_eoi/0
property is an attempt to testriak_pipe_fitting
's behavior duringeoi
propagation. The test sets up a fitting process, then starts zero or more [fake] vnodes, then maybe sends eoi to the fitting, then starts zero or more additional vnodes. All vnodes that receive a#fitting_details{}
reply from the fitting are expected to also receiveeoi
messages from the fitting. The sink should also receive aneoi
.The bug had to do with wether the fitting was still up before
gen_fsm
calls were made against it. We were already catchingnoproc
exits, which is what happened when the fitting was down before the call. In testing,normal
exits were also encountered when the fitting was up before the the call, but then exited before replying. The patch catches all exits now.The property can be run by
eqc:quickcheck(riak_pipe_fitting_eqc:prop_eoi())
oreqc:module(riak_pipe_fitting_eqc)
, or byrebar qc
if you have a new enough rebar. An eunit hook should be added before merge.