From 8c3ee037342a92ea157a569e86d61d3d6f680c13 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 13 Dec 2014 15:14:54 +0000 Subject: [PATCH] Enough intermittent failures already --- tests/Composer/Test/CacheTest.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php index fbd989805..0585e78b8 100644 --- a/tests/Composer/Test/CacheTest.php +++ b/tests/Composer/Test/CacheTest.php @@ -46,13 +46,10 @@ class CacheTest extends TestCase public function testRemoveOutdatedFiles() { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('Test causes intermittent failures with HHVM on Travis'); + if (getenv('TRAVIS')) { + $this->markTestSkipped('Test causes intermittent failures on Travis'); } - // sleeping a bit to let the filesystem cool down on travis or it has intermittent failures - usleep(50000); - $outdated = array_slice($this->files, 1); $this->finder ->expects($this->once()) @@ -73,13 +70,10 @@ class CacheTest extends TestCase public function testRemoveFilesWhenCacheIsTooLarge() { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('Test causes intermittent failures with HHVM on Travis'); + if (getenv('TRAVIS')) { + $this->markTestSkipped('Test causes intermittent failures on Travis'); } - // sleeping a bit to let the filesystem cool down on travis or it has intermittent failures - usleep(50000); - $emptyFinder = $this->getMockBuilder('Symfony\Component\Finder\Finder')->disableOriginalConstructor()->getMock(); $emptyFinder ->expects($this->once())