mirror of
https://github.com/pestphp/pest.git
synced 2026-12-05 15:22:17 +01:00
fix: key Tia worker partials per process to survive batch recycling (#1782)
* fix: key Tia worker partials per process to survive batch recycling * test(tia): refresh visual snapshots for the worker token test --------- Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fc17365bd1
commit
46df02dc28
+2
-1
@@ -1505,7 +1505,8 @@ final class Tia implements AddsOutput, HandlesArguments, HandlesOriginalArgument
|
||||
|
||||
private function workerToken(): string
|
||||
{
|
||||
$raw = $_SERVER['TEST_TOKEN'] ?? $_ENV['TEST_TOKEN'] ?? null;
|
||||
$raw = $_SERVER['UNIQUE_TEST_TOKEN'] ?? $_ENV['UNIQUE_TEST_TOKEN']
|
||||
?? $_SERVER['TEST_TOKEN'] ?? $_ENV['TEST_TOKEN'] ?? null;
|
||||
|
||||
$token = is_scalar($raw) ? (string) $raw : (string) getmypid();
|
||||
$token = preg_replace('/[^A-Za-z0-9_-]/', '', $token);
|
||||
|
||||
Reference in New Issue
Block a user