From 2a936fda7dfbe14996c3f4f34917f6fac6dc21bd Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 8 Mar 2019 22:01:28 +1300 Subject: [PATCH] Attempted test fix This revert test has started failing frequently. It's possible the reason is performance Improvements, resulting ineffectively no change in time between the entries. I's also possible the issue is with the timestamp being used but I think that has a permitted variance --- tests/phpunit/api/v3/LoggingTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/api/v3/LoggingTest.php b/tests/phpunit/api/v3/LoggingTest.php index 0d373b93b3..3d387038cf 100644 --- a/tests/phpunit/api/v3/LoggingTest.php +++ b/tests/phpunit/api/v3/LoggingTest.php @@ -273,6 +273,9 @@ class api_v3_LoggingTest extends CiviUnitTestCase { public function testRevert() { $contactId = $this->individualCreate(); $this->callAPISuccess('Setting', 'create', array('logging' => TRUE)); + // Pause for one second here to ensure the timestamps between the first create action + // and the second differ. + sleep(1); CRM_Core_DAO::executeQuery("SET @uniqueID = 'woot'"); $timeStamp = date('Y-m-d H:i:s'); $this->callAPISuccess('Contact', 'create', array( -- 2.25.1