basho/riak_test — pull request #359 by rzezeski (2013-08-21 15:56:58+00:00)
Title: Faster wait_for_cmd that preserves order

Remove the receive clause for port data. This can cause
`wait_for_cmd` to needlessly loop through all stdout msgs before
getting to the port exit. By just doing selective recv on the exit
msg Erlang will implicit use the "save queue" and place the data msgs
back on the mailbox in the original order of arrival. In fact, the
previous method could rearrange the stdout ordering.