run_parallel_commands doesn't handle exceptions in commands the same way run_commands does
When a command crashes during run_parallel_commands, the entire test just crashes also, whilerun_commands catches such a situation and returns a exception tuple as a result. Shouldn't they work the same way?
Please submit a minimal test case that illustrates the issue.
I can, but it'll be in Elixir using PropCheck library (a thin wrapper around PropEr); my Erlang is not that strong. But I've traced the origin of it:
-
run_parallel_commandsusespmapto run commands in parallel, wrapped inexecute, -
executeis usingapplyBIF instead ofsafe_applylikerun_commandsdoes -
pmapspawns process and awaits the answers, - spawned process catch any error, while executing the command, and send it as a message to
pmap - when the message,
pmapgets, is a crash it just rethrows it
So when a SUT has a crashes, run_commands will return {exception, _, _, _} tuple as a result, while run_parallel_commands just forwards the crash.
I can, but it'll be in Elixir using PropCheck library (a thin wrapper around PropEr); my Erlang is not that strong.
Well, you've came to the PropEr (TM) repository. Here you have your chance to strengthen your Erlang skills ;-)
Well, you've came to the PropEr (TM) repository.
Which runs on a BEAM™ that supports many other languages. Here you have your chance to make us feel included ;)
@kostis test case added, see commit x4lldux/proper@c932eef62cfddc8a2726d09a2cb9bf5e81fd6015
Also, the docs for run_parallel_commands are missing the exception tuple as a valid result type and that's what is being returned when command raises during the sequential part.