Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burgess <88810029+bx80@users.noreply.github.com>2022-02-02 02:19:23 +0300
committerGitHub <noreply@github.com>2022-02-02 02:19:23 +0300
commitf20c4cbed3de7f3fcc49810d5721b257d5a56d43 (patch)
treeda362660970e784654bf9f5ec1d4a55755ed1322 /tests/PHPUnit/System
parentcbb297de4aed974716dd03acfee8832565ebf133 (diff)
Retry scheduled tasks on failure (#18335)
* Catch and log errors for scheduled tasks * Added retry on exception mechanism for scheduled tasks * Replace error code with custom exception * Fix/workaround for SchedulerTest mock breaking retry list option loading * Log warning instead of info if a task has failed three times * Added basic tests, minor code improvements * Test fix * Fix for test * Added integration test to check that only tasks that throw exceptions are scheduled for retry
Diffstat (limited to 'tests/PHPUnit/System')
-rw-r--r--tests/PHPUnit/System/TrackerTest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/PHPUnit/System/TrackerTest.php b/tests/PHPUnit/System/TrackerTest.php
index a675e045d0..592b65c75c 100644
--- a/tests/PHPUnit/System/TrackerTest.php
+++ b/tests/PHPUnit/System/TrackerTest.php
@@ -45,6 +45,7 @@ class TrackerTest extends IntegrationTestCase
Option::delete(self::TASKS_STARTED_OPTION_NAME);
Option::delete(self::TASKS_FINISHED_OPTION_NAME);
Option::delete(Timetable::TIMETABLE_OPTION_STRING);
+ Option::delete(Timetable::RETRY_OPTION_STRING);
SettingsPiwik::overwritePiwikUrl(self::$fixture->getRootUrl() . "tests/PHPUnit/proxy");
}
@@ -399,7 +400,7 @@ class TrackerTest extends IntegrationTestCase
$this->assertCustomTasksWereStarted();
Option::clearCachedOption(self::TASKS_FINISHED_OPTION_NAME);
- $this->assertEmpty(Option::get(self::TASKS_FINISHED_OPTION_NAME));
+ $this->assertFalse(Option::get(self::TASKS_FINISHED_OPTION_NAME));
}
private function assertCustomTasksWereStarted()