From eae08d0adc923b9c5fedd01332937ae6e63d6869 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 22 Jun 2015 12:10:06 +0200 Subject: Release locks after class in tests --- tests/lib/testcase.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php index bb0cb68f754..407c5165140 100644 --- a/tests/lib/testcase.php +++ b/tests/lib/testcase.php @@ -104,6 +104,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { self::tearDownAfterClassCleanFileCache(); self::tearDownAfterClassCleanStrayDataFiles($dataDir); self::tearDownAfterClassCleanStrayHooks(); + self::tearDownAfterClassCleanStrayLocks(); parent::tearDownAfterClass(); } @@ -196,6 +197,13 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { \OC_Hook::clear(); } + /** + * Clean up the list of locks + */ + static protected function tearDownAfterClassCleanStrayLocks() { + \OC::$server->getLockingProvider()->releaseAll(); + } + /** * Login and setup FS as a given user, * sets the given user as the current user. -- cgit v1.2.3