From e94467d6da1613146746edfcb5e4661d96c2343f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sat, 17 Feb 2018 19:46:22 +0100 Subject: [PATCH] Fix incorrect value in L2C+lock test Which was causing the optimistic lock to fail in MySQL since it was trying to update the data with exact same value. --- tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php index b82f25c05..10887e45b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH7067Test.php @@ -3,6 +3,9 @@ declare(strict_types=1); namespace Doctrine\Tests\ORM\Functional\Ticket; +use function sleep; +use function usleep; + final class GH7067Test extends \Doctrine\Tests\OrmFunctionalTestCase { public function setUp() : void @@ -30,7 +33,7 @@ final class GH7067Test extends \Doctrine\Tests\OrmFunctionalTestCase self::assertNotNull($notCached->version, 'Version already cached by persister above, it must be not null'); - $notCached->lastUpdate = new \DateTime(); + $notCached->lastUpdate = new \DateTime('+1 seconds'); $this->_em->flush(); $this->_em->clear();