projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5fde0a
)
CiviUnitTestCase - During cleanup, ensure that we have a clean slate (wrt locking)
author
Tim Otten
<totten@civicrm.org>
Fri, 17 Mar 2023 07:22:03 +0000
(
00:22
-0700)
committer
Tim Otten
<totten@civicrm.org>
Fri, 17 Mar 2023 07:23:02 +0000
(
00:23
-0700)
tests/phpunit/CiviTest/CiviUnitTestCase.php
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/CiviTest/CiviUnitTestCase.php
b/tests/phpunit/CiviTest/CiviUnitTestCase.php
index 993074791491948cc7e2f91b31ea47aea09072eb..0407a3725f5a1c6fa0c32b1cbc0d908d20bfed54 100644
(file)
--- a/
tests/phpunit/CiviTest/CiviUnitTestCase.php
+++ b/
tests/phpunit/CiviTest/CiviUnitTestCase.php
@@
-453,6
+453,8
@@
class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
$this->quickCleanup($tablesToTruncate);
$this->createDomainContacts();
}
+ $releasedLocks = CRM_Core_DAO::singleValueQuery('SELECT RELEASE_ALL_LOCKS()');
+ $this->assertEquals(0, $releasedLocks, "The test should not leave any dangling locks. Found $releasedLocks");
$this->cleanTempDirs();
$this->unsetExtensionSystem();