Merge pull request #23112 from nextcloud/bugfix/noid/increase-timeout-of-statuses
Increase the timeout of statuses
This commit is contained in:
commit
5451dcbec5
|
@ -77,7 +77,7 @@ class StatusService {
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public const INVALIDATE_STATUS_THRESHOLD = 5 /* minutes */ * 60 /* seconds */;
|
public const INVALIDATE_STATUS_THRESHOLD = 15 /* minutes */ * 60 /* seconds */;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public const MAXIMUM_MESSAGE_LENGTH = 80;
|
public const MAXIMUM_MESSAGE_LENGTH = 80;
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ClearOldStatusesBackgroundJobTest extends TestCase {
|
||||||
->with(1337);
|
->with(1337);
|
||||||
$this->mapper->expects($this->once())
|
$this->mapper->expects($this->once())
|
||||||
->method('clearStatusesOlderThan')
|
->method('clearStatusesOlderThan')
|
||||||
->with(1037, 1337);
|
->with(437, 1337);
|
||||||
|
|
||||||
$this->time->method('getTime')
|
$this->time->method('getTime')
|
||||||
->willReturn(1337);
|
->willReturn(1337);
|
||||||
|
|
|
@ -152,7 +152,7 @@ class StatusServiceTest extends TestCase {
|
||||||
$status->setIsUserDefined(true);
|
$status->setIsUserDefined(true);
|
||||||
|
|
||||||
$this->timeFactory->method('getTime')
|
$this->timeFactory->method('getTime')
|
||||||
->willReturn(1400);
|
->willReturn(2600);
|
||||||
$this->mapper->expects($this->once())
|
$this->mapper->expects($this->once())
|
||||||
->method('findByUserId')
|
->method('findByUserId')
|
||||||
->with('john.doe')
|
->with('john.doe')
|
||||||
|
@ -160,7 +160,7 @@ class StatusServiceTest extends TestCase {
|
||||||
|
|
||||||
$this->assertEquals($status, $this->service->findByUserId('john.doe'));
|
$this->assertEquals($status, $this->service->findByUserId('john.doe'));
|
||||||
$this->assertEquals('offline', $status->getStatus());
|
$this->assertEquals('offline', $status->getStatus());
|
||||||
$this->assertEquals(1400, $status->getStatusTimestamp());
|
$this->assertEquals(2600, $status->getStatusTimestamp());
|
||||||
$this->assertFalse($status->getIsUserDefined());
|
$this->assertFalse($status->getIsUserDefined());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue