diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-10-01 11:43:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 11:43:36 +0200 |
commit | 5451dcbec504c3b0a9b57c0794e71868a9b6254e (patch) | |
tree | c112fa3767d1c3c0d8d33105cafb7169175881ad | |
parent | 6b7d91d7c14b50ce3f93c79b602954670766231c (diff) | |
parent | 0c7c358d134e4f12b18364f23e32b991176dabc1 (diff) | |
download | nextcloud-server-5451dcbec504c3b0a9b57c0794e71868a9b6254e.tar.gz nextcloud-server-5451dcbec504c3b0a9b57c0794e71868a9b6254e.zip |
Merge pull request #23112 from nextcloud/bugfix/noid/increase-timeout-of-statuses
Increase the timeout of statuses
3 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php index 85368342b25..39edad35850 100644 --- a/apps/user_status/lib/Service/StatusService.php +++ b/apps/user_status/lib/Service/StatusService.php @@ -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; diff --git a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php index ccb649ecce3..682151a3f5d 100644 --- a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php +++ b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php @@ -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); diff --git a/apps/user_status/tests/Unit/Service/StatusServiceTest.php b/apps/user_status/tests/Unit/Service/StatusServiceTest.php index 4f47070e7c1..1e61f5b09ca 100644 --- a/apps/user_status/tests/Unit/Service/StatusServiceTest.php +++ b/apps/user_status/tests/Unit/Service/StatusServiceTest.php @@ -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()); } |