From: Robin Appelman Date: Fri, 5 Jul 2013 12:51:22 +0000 (+0200) Subject: Scanner test: ensure mtime in the cache is the same as on the storage to prevent... X-Git-Tag: v5.0.10~16^2~1^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fea2a4a2005f50cf136173304f8785dd0d050146;p=nextcloud-server.git Scanner test: ensure mtime in the cache is the same as on the storage to prevent random failures --- diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php index e93c51441b1..4e059d2cf03 100644 --- a/tests/lib/files/cache/scanner.php +++ b/tests/lib/files/cache/scanner.php @@ -132,6 +132,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $this->scanner->scan(''); $oldData = $this->cache->get(''); $this->storage->unlink('folder/bar.txt'); + $this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder'))); $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE); $newData = $this->cache->get(''); $this->assertNotEquals($oldData['etag'], $newData['etag']);