From cb1e03aad1a37995854e14f5817109e637161f52 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 17 Oct 2024 00:24:55 +1100 Subject: [PATCH] [8.x] Fixes Failing test: Jest Integration Tests.x-pack/plugins/task_manager/server/integration_tests - unrecognized task types should be no workload aggregator errors when there are removed task types (#196179) (#196217) # Backport This will backport the following commits from `main` to `8.x`: - [Fixes Failing test: Jest Integration Tests.x-pack/plugins/task_manager/server/integration_tests - unrecognized task types should be no workload aggregator errors when there are removed task types (#196179)](https://github.com/elastic/kibana/pull/196179) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Ying Mao Co-authored-by: Elastic Machine --- .../server/integration_tests/removed_types.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts b/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts index aeb182c4794e6..835cf799b60f2 100644 --- a/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts +++ b/x-pack/plugins/task_manager/server/integration_tests/removed_types.test.ts @@ -127,7 +127,9 @@ describe('unrecognized task types', () => { if (errorLogCalls) { // should be no workload aggregator errors for (const elog of errorLogCalls) { - expect(elog).not.toMatch(/^\[WorkloadAggregator\]: Error: Unsupported task type/i); + if (typeof elog === 'string') { + expect(elog).not.toMatch(/^\[WorkloadAggregator\]: Error: Unsupported task type/i); + } } } });