]> source.dussan.org Git - nextcloud-server.git/commitdiff
Increase the timeout of statuses 23121/head
authorJoas Schilling <coding@schilljs.com>
Wed, 30 Sep 2020 14:17:18 +0000 (16:17 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 1 Oct 2020 09:45:46 +0000 (09:45 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/user_status/lib/Service/StatusService.php
apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php
apps/user_status/tests/Unit/Service/StatusServiceTest.php

index 85368342b2596b1b1cb28cc7fe5a63c55e071904..39edad358505938254b6f0f7281253ae7cd1c721 100644 (file)
@@ -77,7 +77,7 @@ class StatusService {
        ];
 
        /** @var int */
-       public const INVALIDATE_STATUS_THRESHOLD = 5 /* minutes */ * 60 /* seconds */;
+       public const INVALIDATE_STATUS_THRESHOLD = 15 /* minutes */ * 60 /* seconds */;
 
        /** @var int */
        public const MAXIMUM_MESSAGE_LENGTH = 80;
index ccb649ecce30f3be25ca36f995ca985e28bd31a6..682151a3f5d4e0128aeb5ed9248300fc8c88a224 100644 (file)
@@ -56,7 +56,7 @@ class ClearOldStatusesBackgroundJobTest extends TestCase {
                        ->with(1337);
                $this->mapper->expects($this->once())
                        ->method('clearStatusesOlderThan')
-                       ->with(1037, 1337);
+                       ->with(437, 1337);
 
                $this->time->method('getTime')
                        ->willReturn(1337);
index 4f47070e7c1c9ee3b58b89d8e32b22b8dc0fb09a..1e61f5b09caa94a32a091803ccb6b2308e085e78 100644 (file)
@@ -152,7 +152,7 @@ class StatusServiceTest extends TestCase {
                $status->setIsUserDefined(true);
 
                $this->timeFactory->method('getTime')
-                       ->willReturn(1400);
+                       ->willReturn(2600);
                $this->mapper->expects($this->once())
                        ->method('findByUserId')
                        ->with('john.doe')
@@ -160,7 +160,7 @@ class StatusServiceTest extends TestCase {
 
                $this->assertEquals($status, $this->service->findByUserId('john.doe'));
                $this->assertEquals('offline', $status->getStatus());
-               $this->assertEquals(1400, $status->getStatusTimestamp());
+               $this->assertEquals(2600, $status->getStatusTimestamp());
                $this->assertFalse($status->getIsUserDefined());
        }