Scanner test: ensure mtime in the cache is the same as on the storage to prevent random failures
This commit is contained in:
parent
63c83ff50b
commit
3f5eb762b6
|
@ -132,6 +132,7 @@ class Scanner extends \PHPUnit_Framework_TestCase {
|
||||||
$this->scanner->scan('');
|
$this->scanner->scan('');
|
||||||
$oldData = $this->cache->get('');
|
$oldData = $this->cache->get('');
|
||||||
$this->storage->unlink('folder/bar.txt');
|
$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);
|
$this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
|
||||||
$newData = $this->cache->get('');
|
$newData = $this->cache->get('');
|
||||||
$this->assertNotEquals($oldData['etag'], $newData['etag']);
|
$this->assertNotEquals($oldData['etag'], $newData['etag']);
|
||||||
|
|
Loading…
Reference in New Issue