From daafc6cc905c9ca5fa652a7a07ae70ac625b0509 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 19 May 2021 08:38:08 +1000 Subject: [PATCH] [NFC] Remove timecop function references from Cache Tiered Test --- tests/phpunit/E2E/Cache/TieredTest.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/phpunit/E2E/Cache/TieredTest.php b/tests/phpunit/E2E/Cache/TieredTest.php index a68900238f..bcff556417 100644 --- a/tests/phpunit/E2E/Cache/TieredTest.php +++ b/tests/phpunit/E2E/Cache/TieredTest.php @@ -27,13 +27,6 @@ class E2E_Cache_TieredTest extends E2E_Cache_CacheTestCase { */ protected $b; - protected function tearDown(): void { - if (function_exists('timecop_return')) { - timecop_return(); - } - parent::tearDown(); - } - public function createSimpleCache($maxTimeouts = [86400]) { return new CRM_Utils_Cache_Tiered([ $this->a = CRM_Utils_Cache::create([ @@ -170,7 +163,7 @@ class E2E_Cache_TieredTest extends E2E_Cache_CacheTestCase { $this->assertApproxEquals(NULL, $this->a->getExpires('foo'), self::TOLERANCE); $this->assertApproxEquals($start + 1000, $this->b->getExpires('foo'), self::TOLERANCE); - function_exists('timecop_return') ? timecop_travel(time() + self::TOLERANCE) : sleep(self::TOLERANCE); + sleep(self::TOLERANCE); $this->assertEquals('bar', $this->cache->get('foo')); $this->assertApproxEquals($start + 100 + self::TOLERANCE, $this->a->getExpires('foo'), self::TOLERANCE); -- 2.25.1