aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-03-29 18:03:03 +0200
committerRobin Appelman <robin@icewind.nl>2024-01-02 15:40:32 +0100
commit0e98f1eb8dbf1c3cdf4240a7754f9b90fd1fdcbf (patch)
treef54bfe47eefe940035f874d4819cc37ab15a2761 /tests
parentfc0822d37db94fa8cc21cadca118a47f425f5f5f (diff)
downloadnextcloud-server-0e98f1eb8dbf1c3cdf4240a7754f9b90fd1fdcbf.tar.gz
nextcloud-server-0e98f1eb8dbf1c3cdf4240a7754f9b90fd1fdcbf.zip
restore shared lock ttl when releasing
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Lock/MemcacheLockingProviderTest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/Lock/MemcacheLockingProviderTest.php b/tests/lib/Lock/MemcacheLockingProviderTest.php
index b67be799d59..95001ec03a3 100644
--- a/tests/lib/Lock/MemcacheLockingProviderTest.php
+++ b/tests/lib/Lock/MemcacheLockingProviderTest.php
@@ -22,6 +22,7 @@
namespace Test\Lock;
use OC\Memcache\ArrayCache;
+use OCP\AppFramework\Utility\ITimeFactory;
class MemcacheLockingProviderTest extends LockingProvider {
/**
@@ -34,7 +35,8 @@ class MemcacheLockingProviderTest extends LockingProvider {
*/
protected function getInstance() {
$this->memcache = new ArrayCache();
- return new \OC\Lock\MemcacheLockingProvider($this->memcache);
+ $timeProvider = \OC::$server->get(ITimeFactory::class);
+ return new \OC\Lock\MemcacheLockingProvider($this->memcache, $timeProvider);
}
protected function tearDown(): void {