Mark tests that use sleep calls as slow, so we can ignore them when running unit tests in development

This commit is contained in:
Simon Wisselink
2021-01-16 23:01:15 +01:00
parent 3af2df20a4
commit fedc127057
5 changed files with 14 additions and 7 deletions

View File

@@ -339,6 +339,10 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
$this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3));
$this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4));
} }
/**
* @group slow
*/
public function testClearCacheExpired() public function testClearCacheExpired()
{ {
$this->smarty->caching = true; $this->smarty->caching = true;
@@ -399,7 +403,7 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @dataProvider data * @dataProvider data
* * @group slow
*/ */
public function testCache($lockTime, $lockTimeout, $compile_id, $cache_id, $isCached, $tmin, $tmax, $forceCompile, $forceCache, $update, $testNumber, $compileTestNumber, $renderTestNumber, $testName) public function testCache($lockTime, $lockTimeout, $compile_id, $cache_id, $isCached, $tmin, $tmax, $forceCompile, $forceCache, $update, $testNumber, $compileTestNumber, $renderTestNumber, $testName)
{ {

View File

@@ -125,7 +125,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty
* test grandchild/child/parent dependency test2 * test grandchild/child/parent dependency test2
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* * @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_2() public function testCompileBlockGrandChildMustCompile_021_2()
{ {
@@ -193,7 +193,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty
* test grandchild/child/parent dependency test4 * test grandchild/child/parent dependency test4
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* * @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_4() public function testCompileBlockGrandChildMustCompile_021_4()
{ {

View File

@@ -610,7 +610,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
* *
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* * @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_2() public function testCompileBlockGrandChildMustCompile_021_2()
{ {
@@ -645,7 +645,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
* *
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* * @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_3() public function testCompileBlockGrandChildMustCompile_021_3()
{ {
@@ -670,7 +670,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
* *
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* * @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_32() public function testCompileBlockGrandChildMustCompile_021_32()
{ {
@@ -692,6 +692,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
* *
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_4() public function testCompileBlockGrandChildMustCompile_021_4()
{ {
@@ -716,6 +717,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
* *
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @group slow
*/ */
public function testCompileBlockGrandChildMustCompile_021_42() public function testCompileBlockGrandChildMustCompile_021_42()
{ {

View File

@@ -210,6 +210,7 @@ class CompileInsertTest extends PHPUnit_Smarty
* test insert plugin caching 2 * test insert plugin caching 2
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @group slow
*/ */
public function testInsertPluginCaching3_2() public function testInsertPluginCaching3_2()
{ {

View File

@@ -35,7 +35,7 @@ class SmartyNowTest extends PHPUnit_Smarty
} }
/** /**
* test {$smarty.now nocache} * test {$smarty.now nocache}
* * @group slow
*/ */
public function testSmartyNowNocache() { public function testSmartyNowNocache() {
$this->smarty->setCaching(true); $this->smarty->setCaching(true);