summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-09-18 12:34:43 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-10-04 09:31:41 +0200
commit76a7600e2e8ee239c2f7dd19e8b3d1e86f7c5362 (patch)
treef7220f0796998a1f7b19cb0e5192b0f28dd5fc35 /tests
parenteba83d22bbcf45caf400704b8794acce180c5ba9 (diff)
downloadnextcloud-server-76a7600e2e8ee239c2f7dd19e8b3d1e86f7c5362.tar.gz
nextcloud-server-76a7600e2e8ee239c2f7dd19e8b3d1e86f7c5362.zip
Allow configuring the activity update interval of token
On some systems with a lot of users this creates a lot of extra DB writes. Being able to increase this interval helps there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
index c16ee7b818e..a815025a509 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
@@ -112,6 +112,12 @@ class PublicKeyTokenProviderTest extends TestCase {
public function testUpdateTokenDebounce() {
$tk = new PublicKeyToken();
+
+ $this->config->method('getSystemValueInt')
+ ->willReturnCallback(function ($value, $default) {
+ return $default;
+ });
+
$tk->setLastActivity($this->time - 30);
$this->mapper->expects($this->never())
->method('update')