diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-10 09:31:22 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-10 09:31:22 +0200 |
commit | 73fb722a9e34dccc428bbf38adf40657ac98c94e (patch) | |
tree | 06848692b089586cd56f3807c4023f3b2dda36cb /tests | |
parent | b237d0379162b52269a6ea8292165d448d075f46 (diff) | |
download | nextcloud-server-73fb722a9e34dccc428bbf38adf40657ac98c94e.tar.gz nextcloud-server-73fb722a9e34dccc428bbf38adf40657ac98c94e.zip |
add timeouts 3/30/90 to phpunit tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/dbschema.php | 3 | ||||
-rw-r--r-- | tests/lib/files/cache/watcher.php | 3 | ||||
-rw-r--r-- | tests/lib/files/view.php | 24 | ||||
-rw-r--r-- | tests/phpunit-autotest.xml | 7 |
4 files changed, 36 insertions, 1 deletions
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php index e20a04ef7fd..a2ef1572fd5 100644 --- a/tests/lib/dbschema.php +++ b/tests/lib/dbschema.php @@ -36,6 +36,9 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase { } // everything in one test, they depend on each other + /** + * @medium + */ public function testSchema() { $this->doTestSchemaCreating(); $this->doTestSchemaChanging(); diff --git a/tests/lib/files/cache/watcher.php b/tests/lib/files/cache/watcher.php index e43c86ed438..d9301a903cb 100644 --- a/tests/lib/files/cache/watcher.php +++ b/tests/lib/files/cache/watcher.php @@ -63,6 +63,9 @@ class Watcher extends \PHPUnit_Framework_TestCase { $this->assertFalse($cache->inCache('folder/bar2.txt')); } + /** + * @medium + */ public function testFileToFolder() { $storage = $this->getTestStorage(); $cache = $storage->getCache(); diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 01f9a9cca11..830913a91ad 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -33,6 +33,9 @@ class View extends \PHPUnit_Framework_TestCase { } } + /** + * @medium + */ public function testCacheAPI() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); @@ -104,6 +107,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertEquals(array(), $rootView->getDirectoryContent('/non/existing')); } + /** + * @medium + */ function testGetPath() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); @@ -127,6 +133,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertNull($folderView->getPath($id1)); } + /** + * @medium + */ function testMountPointOverwrite() { $storage1 = $this->getTestStorage(false); $storage2 = $this->getTestStorage(); @@ -170,6 +179,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertEquals($textSize, $folderData[0]['size']); } + /** + * @medium + */ function testSearch() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); @@ -217,6 +229,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertEquals(3, count($folderView->searchByMime('text'))); } + /** + * @medium + */ function testWatcher() { $storage1 = $this->getTestStorage(); \OC\Files\Filesystem::mount($storage1, array(), '/'); @@ -234,6 +249,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertEquals(3, $cachedData['size']); } + /** + * @medium + */ function testCopyBetweenStorages() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); @@ -255,6 +273,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertTrue($rootView->file_exists('/substorage/folder/bar.txt')); } + /** + * @medium + */ function testMoveBetweenStorages() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); @@ -271,6 +292,9 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertTrue($rootView->file_exists('anotherfolder/bar.txt')); } + /** + * @medium + */ function testTouch() { $storage = $this->getTestStorage(true, '\Test\Files\TemporaryNoTouch'); diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml index e9ee7d8d70d..d74451cbe6c 100644 --- a/tests/phpunit-autotest.xml +++ b/tests/phpunit-autotest.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="utf-8" ?> -<phpunit bootstrap="bootstrap.php"> +<phpunit bootstrap="bootstrap.php" + strict="true" + timeoutForSmallTests="3" + timeoutForMediumTests="30" + timeoutForLargeTests="90" +> <testsuite name='ownCloud'> <directory suffix='.php'>lib/</directory> <file>apps.php</file> |