summaryrefslogtreecommitdiffstats
path: root/tests/lib/files/storage/storage.php
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2013-07-03 18:08:19 +0200
committerChristian Berendt <berendt@b1-systems.de>2013-07-03 18:08:19 +0200
commit21601fd78448ede37bc6f55c9880fc27a4df9ae3 (patch)
treeadc6d1cb1146a81bc9d60aa54d27ccca77434532 /tests/lib/files/storage/storage.php
parent5a5a0e82f52a8a7115109581aaa6ab5bc7285448 (diff)
downloadnextcloud-server-21601fd78448ede37bc6f55c9880fc27a4df9ae3.tar.gz
nextcloud-server-21601fd78448ede37bc6f55c9880fc27a4df9ae3.zip
increasing difference for modifcation time tests
one second is sometimes not enough when using a slow storage connection, three seconds is working better (at least when testing against S3)
Diffstat (limited to 'tests/lib/files/storage/storage.php')
-rw-r--r--tests/lib/files/storage/storage.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index fb3e05e66b3..155a99d8bab 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -168,10 +168,10 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$this->assertTrue($this->instance->isReadable('/lorem.txt'));
$ctimeEnd = time();
$mTime = $this->instance->filemtime('/lorem.txt');
- $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1));
- $this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1));
+ $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 3));
+ $this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 3));
- $this->assertTrue(($ctimeStart - 1) <= $mTime);
+ $this->assertTrue(($ctimeStart - 3) <= $mTime);
$this->assertTrue($mTime <= ($ctimeEnd + 1));
$this->assertEquals(filesize($textFile), $this->instance->filesize('/lorem.txt'));
@@ -185,10 +185,10 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$mtimeEnd = time();
if ($supportsTouch !== false) {
$mTime = $this->instance->filemtime('/lorem.txt');
- $this->assertTrue(($mtimeStart - 1) <= $mTime);
- $this->assertTrue($mTime <= ($mtimeEnd + 1));
+ $this->assertTrue(($mtimeStart - 3) <= $mTime);
+ $this->assertTrue($mTime <= ($mtimeEnd + 3));
- $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1));
+ $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 3));
if ($this->instance->touch('/lorem.txt', 100) !== false) {
$mTime = $this->instance->filemtime('/lorem.txt');
@@ -203,11 +203,11 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
clearstatcache();
$mtimeEnd = time();
$mTime = $this->instance->filemtime('/lorem.txt');
- $this->assertTrue(($mtimeStart - 1) <= $mTime);
- $this->assertTrue($mTime <= ($mtimeEnd + 1));
+ $this->assertTrue(($mtimeStart - 3) <= $mTime);
+ $this->assertTrue($mTime <= ($mtimeEnd + 3));
$this->instance->unlink('/lorem.txt');
- $this->assertTrue($this->instance->hasUpdated('/', $mtimeStart - 1));
+ $this->assertTrue($this->instance->hasUpdated('/', $mtimeStart - 3));
}
public function testSearch() {