From 618b21d8e3dda496db0a01387f2f8ebf46ecc419 Mon Sep 17 00:00:00 2001 From: Nazar Leush Date: Tue, 18 Aug 2026 15:20:20 +0300 Subject: [PATCH 1/3] restart failed tests --- modules/tests-ui/models.js | 4 +++- modules/tests-ui/tester.js | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/tests-ui/models.js b/modules/tests-ui/models.js index 8416a0d14..5f5ab8f18 100644 --- a/modules/tests-ui/models.js +++ b/modules/tests-ui/models.js @@ -54,6 +54,8 @@ index: true }, + last_test_finished_at: Date, + // Special urls to test. Can be added manually or by tester when error occurs: to keep url in future sets. additional_test_urls: [String], @@ -152,4 +154,4 @@ export const PluginTest = db.model('PluginTest', PluginTestSchema); export const PageTestLog = db.model('PageTestLog', PageTestLogSchema); export const TestUrlsSet = db.model('TestUrlsSet', TestUrlsSetSchema); - export const TestingProgress = db.model('TestingProgress', TestingProgressSchema); \ No newline at end of file + export const TestingProgress = db.model('TestingProgress', TestingProgressSchema); diff --git a/modules/tests-ui/tester.js b/modules/tests-ui/tester.js index fae56f129..a8fa6ce37 100644 --- a/modules/tests-ui/tester.js +++ b/modules/tests-ui/tester.js @@ -637,7 +637,12 @@ function testAll(cb) { var filterDate = new Date(new Date() - CONFIG.tests.plugin_test_period); pluginTests = pluginTests.filter(function(pluginTest) { - return !pluginTest.last_test_started_at || pluginTest.last_test_started_at < filterDate; + + // Started but never finished: process crashed or test errored. Re-run on restart. + var unfinished = pluginTest.last_test_started_at + && (!pluginTest.last_test_finished_at || pluginTest.last_test_finished_at < pluginTest.last_test_started_at); + + return unfinished || !pluginTest.last_test_started_at || pluginTest.last_test_started_at < filterDate; }); pluginTests.sort(function(a, b) { @@ -709,6 +714,7 @@ function testAll(cb) { pluginTest.error = error; } else { pluginTest.error = undefined; + pluginTest.last_test_finished_at = new Date(); } pluginTest.save() .then(data => { From 39deea2e8b353e8387e0fb8b929ee8230347861a Mon Sep 17 00:00:00 2001 From: Nazar Leush Date: Tue, 18 Aug 2026 15:23:23 +0300 Subject: [PATCH 2/3] single rerun tests to finish unfinished --- modules/tests-ui/tester.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/tests-ui/tester.js b/modules/tests-ui/tester.js index a8fa6ce37..8fd549ec4 100644 --- a/modules/tests-ui/tester.js +++ b/modules/tests-ui/tester.js @@ -764,13 +764,18 @@ function testAll(cb) { }); } -function startTest() { +function startTest(isRerun) { testAll(function() { if (testOnePlugin) { process.exit(0); } + if (!isRerun) { + // Single re-run to pick up unfinished tests (filter will select only them). + return startTest(true); + } + setTimeout(function() { // Script should be restarted on that period to check new files version. process.exit(0); From fe1d3d85dcaf3990ed64518f95b7cb0759407dd3 Mon Sep 17 00:00:00 2001 From: Nazar Leush Date: Tue, 18 Aug 2026 16:04:29 +0300 Subject: [PATCH 3/3] hide error: No test feeds specified --- modules/tests-ui/tester.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tests-ui/tester.js b/modules/tests-ui/tester.js index 8fd549ec4..5201cdde1 100644 --- a/modules/tests-ui/tester.js +++ b/modules/tests-ui/tester.js @@ -346,7 +346,8 @@ function processPluginTests(pluginTest, plugin, count, cb) { if (urls.length == 0) { errors.push("No test urls specified"); } else if (!reachTestObjectFound) { - errors.push("No test feeds specified"); + // Keep tests cleaner. Hard to find feeds for all. + // errors.push("No test feeds specified"); } // TODO: add additional_test_urls.