From 055c1cde4794b8edcae831ee2176bc7d57b9c900 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 22 Sep 2007 14:44:56 -0400 Subject: [PATCH] Fix a failing unit test to work around the file system being slow * UnitTest/TemplateTest.php: (TemplateTest::testDbCache): sleep() for a second in order to allow the file system to catch up to the changes we're making --- UnitTest/TemplateTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/UnitTest/TemplateTest.php b/UnitTest/TemplateTest.php index 0658220..87bf387 100644 --- a/UnitTest/TemplateTest.php +++ b/UnitTest/TemplateTest.php @@ -128,6 +128,7 @@ class TemplateTest extends PHPUnit_Framework_TestCase $this->assertEquals('store in the database', $this->fixture->fetch('db.cache')); file_put_contents(TEST_TEMPLATE_PATH . '/db.cache.test.tpl', 'store in the database, retouched'); + sleep(1); // give the file system some time touch(TEST_TEMPLATE_PATH . '/db.cache.test.tpl'); clearstatcache(); $this->setUp(); -- 2.22.5