From 3a730ec57c2a29765b438cc8bd9559eda2e8f648 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Sep 2022 01:34:21 +0000 Subject: [PATCH] Tests: Increase the time difference for the `expires` header in Site Health page cache tests. This aims to avoid a race condition in the Code Coverage Report, which takes longer than 10 minutes to run, and by the time the page cache test runs, the `expires` header that is supposed to be in the future is already in the past. Follow-up to [54043]. Props Clorith, davidbaumwald, flixos90, desrosj, SergeyBiryukov. See #56041. git-svn-id: https://develop.svn.wordpress.org/trunk@54045 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/site-health.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/site-health.php b/tests/phpunit/tests/site-health.php index 267028c982..d39eb4edaf 100644 --- a/tests/phpunit/tests/site-health.php +++ b/tests/phpunit/tests/site-health.php @@ -349,7 +349,7 @@ class Tests_Site_Health extends WP_UnitTestCase { 'responses' => array_fill( 0, 3, - array( 'expires' => gmdate( 'r', time() + MINUTE_IN_SECONDS * 10 ) ) + array( 'expires' => gmdate( 'r', time() + HOUR_IN_SECONDS ) ) ), 'expected_status' => 'good', 'expected_label' => $good_label, @@ -358,7 +358,7 @@ class Tests_Site_Health extends WP_UnitTestCase { 'responses' => array_fill( 0, 3, - array( 'expires' => gmdate( 'r', time() - MINUTE_IN_SECONDS * 10 ) ) + array( 'expires' => gmdate( 'r', time() - HOUR_IN_SECONDS ) ) ), 'expected_status' => 'critical', 'expected_label' => $critical_label,