From 3f5eb762b6d7572b68c77f0009a76ff9b1f8d946 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Fri, 5 Jul 2013 14:51:22 +0200
Subject: [PATCH] Scanner test: ensure mtime in the cache is the same as on the
 storage to prevent random failures

---
 tests/lib/files/cache/scanner.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index 042bf8991f..263ceadccc 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']);
-- 
GitLab