basho/riak_test — pull request #403 by Vagabond (2013-10-07 17:52:42+00:00)
Title: Return unexpected results from wait_until

Debugging failed wait_untils can be very annoying because wait_until obscures the unexpected result and returns 'fail' instead.

As an alternative, inspired by EQC postconditions, if the wait_until returns anything other than true on the final iteration, that is wrapped in a {fail, Result} tuple and returned instead. This means lines like ?assertEqual(true, rt:wait_until(...)) will indicate what actually happened now, rather than just failing to match true against 'fail'.