mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Cache: use greaterEquals in tests cases to prevent failures due to race conditions
This commit is contained in:
parent
0cde86ac55
commit
5d0c5c854b
1 changed files with 3 additions and 3 deletions
6
tests/lib/files/cache/updater.php
vendored
6
tests/lib/files/cache/updater.php
vendored
|
|
@ -61,7 +61,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
|
|||
}
|
||||
|
||||
public function tearDown() {
|
||||
if($this->cache){
|
||||
if ($this->cache) {
|
||||
$this->cache->clear();
|
||||
}
|
||||
Filesystem::tearDown();
|
||||
|
|
@ -82,7 +82,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
|
|||
$cachedData = $this->cache->get('');
|
||||
$this->assertEquals(2 * $textSize + $imageSize + 3, $cachedData['size']);
|
||||
$this->assertNotEquals($rootCachedData['etag'], $cachedData['etag']);
|
||||
$this->assertEquals($mtime, $rootCachedData['mtime']);
|
||||
$this->assertGreaterThanOrEqual($rootCachedData['mtime'], $mtime);
|
||||
$rootCachedData = $cachedData;
|
||||
|
||||
$this->assertFalse($this->cache->inCache('bar.txt'));
|
||||
|
|
@ -94,7 +94,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
|
|||
$cachedData = $this->cache->get('');
|
||||
$this->assertEquals(2 * $textSize + $imageSize + 2 * 3, $cachedData['size']);
|
||||
$this->assertNotEquals($rootCachedData['etag'], $cachedData['etag']);
|
||||
$this->assertEquals($mtime, $rootCachedData['mtime']);
|
||||
$this->assertGreaterThanOrEqual($rootCachedData['mtime'], $mtime);
|
||||
}
|
||||
|
||||
public function testDelete() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue