diff --git a/src/Plugins/Retry.php b/src/Plugins/Retry.php index f17d74c4..94b703e1 100644 --- a/src/Plugins/Retry.php +++ b/src/Plugins/Retry.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Pest\Plugins; use Pest\Contracts\Plugins\HandlesArguments; +use Pest\Exceptions\InvalidOption; /** * @internal @@ -22,6 +23,11 @@ final class Retry implements HandlesArguments return $arguments; } + // If running in parallel, we need to disable the retry plugin + if ($this->hasArgument('--parallel', $arguments)) { + throw new InvalidOption('The [--retry] option is not supported when running in parallel.'); + } + $arguments = $this->popArgument('--retry', $arguments); $arguments = $this->pushArgument('--order-by=defects', $arguments);