Skip to content

Commit 19366c5

Browse files
authored
Merge pull request #8953 from ProcessMaker/fix-test-transition-executor-command
Fix Test Suite for Transition Executor Command
2 parents c80417f + 2761fb3 commit 19366c5

2 files changed

Lines changed: 277 additions & 190 deletions

File tree

ProcessMaker/Console/Commands/TransitionExecutors.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public function handle(): int
7070
return 0;
7171
}
7272

73-
$client = new Client($url);
74-
$client->setTimeout($timeout);
73+
$client = $this->createBroadcastClient($url, (int) $timeout);
7574

7675
$index = 0;
7776
$total = $executors->count();
@@ -176,4 +175,15 @@ private function getExecutors($uuid): Collection
176175

177176
return $query->get();
178177
}
178+
179+
/**
180+
* Create the websocket client used to listen for build events.
181+
*/
182+
protected function createBroadcastClient(string $url, int $timeout): Client
183+
{
184+
$client = new Client($url);
185+
$client->setTimeout($timeout);
186+
187+
return $client;
188+
}
179189
}

0 commit comments

Comments
 (0)