From 5ad047a0bbd2754ff01ede9fec46830ce40e94dd Mon Sep 17 00:00:00 2001 From: Jan Tvrdik Date: Wed, 1 May 2019 22:19:55 +0200 Subject: [PATCH] tests: fix race condition --- tests/bootstrap.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 554fa65..952ae9f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,7 +2,8 @@ require __DIR__ . '/../vendor/autoload.php'; -const TEMP_DIR = __DIR__ . '/../temp'; - Tester\Environment::setup(); + +define('TEMP_DIR', __DIR__ . '/tmp/' . getmypid()); +@mkdir(dirname(TEMP_DIR)); // @ - directory may already exist Tester\Helpers::purge(TEMP_DIR);