From 18571fbcc5cc7d05cc20402e53b7b9a63e44caba Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Mon, 14 Oct 2024 18:35:37 -0400 Subject: [PATCH] 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) (cherry picked from commit d70583faddd3b5f3f3e8d59888a8bebdb262a4d2) --- .../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); + } } } });