From 0348037638e8a9bc6c5d93a9891576deec27f9f4 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 20 Feb 2023 16:26:01 +0000 Subject: [PATCH] fix: retry option should not be used in parallel --- src/Plugins/Retry.php | 6 ++++++ 1 file changed, 6 insertions(+) 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);