Skip to content

Commit

Permalink
Attempted test fix
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eileenmcnaughton committed Mar 10, 2019
1 parent 7aa9abe commit 2a936fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/phpunit/api/v3/LoggingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ protected function createLegacyStyleContactLogTable() {
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(
Expand Down

0 comments on commit 2a936fd

Please sign in to comment.