diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-30 23:15:28 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-30 23:15:45 +0100 |
commit | 5d0c5c854bf5aa200ae37664d8b39001612e8d5e (patch) | |
tree | b72f22a466f2767401277e93838bec1b484bda34 | |
parent | 0cde86ac5561f468c7218e74192cb23fb4ace0c3 (diff) | |
download | nextcloud-server-5d0c5c854bf5aa200ae37664d8b39001612e8d5e.tar.gz nextcloud-server-5d0c5c854bf5aa200ae37664d8b39001612e8d5e.zip |
Cache: use greaterEquals in tests cases to prevent failures due to race conditions
-rw-r--r-- | tests/lib/files/cache/updater.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php index b4f373cdc2a..b83dd0c26e5 100644 --- a/tests/lib/files/cache/updater.php +++ b/tests/lib/files/cache/updater.php @@ -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() { |