From d137ffe0a4545245f3de986533655040c3fb5f0e Mon Sep 17 00:00:00 2001 From: Waleed Gadelkareem Date: Fri, 13 Jan 2017 18:09:36 +0100 Subject: [PATCH] Allow gearman environment vars --- .../Tests/ORM/Functional/Locking/LockAgentWorker.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php b/tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php index c3d226aa4..c7b82f7a8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php +++ b/tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php @@ -16,7 +16,10 @@ class LockAgentWorker $lockAgent = new LockAgentWorker(); $worker = new \GearmanWorker(); - $worker->addServer(); + $worker->addServer( + isset($_SERVER['GEARMAN_HOST']) ? $_SERVER['GEARMAN_HOST'] : null, + isset($_SERVER['GEARMAN_PORT']) ? $_SERVER['GEARMAN_PORT'] : 4730 + ); $worker->addFunction("findWithLock", [$lockAgent, "findWithLock"]); $worker->addFunction("dqlWithLock", [$lockAgent, "dqlWithLock"]); $worker->addFunction('lock', [$lockAgent, 'lock']);