diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/install_large_prebuilt_rules_package.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/install_large_prebuilt_rules_package.ts index 71180173c4501..dc6d1d1df2e24 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/install_large_prebuilt_rules_package.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/install_large_prebuilt_rules_package.ts @@ -21,8 +21,7 @@ export default ({ getService }: FtrProviderContext): void => { describe('@ess @serverless @skipInQA install_large_prebuilt_rules_package', () => { beforeEach(async () => { await deleteAllRules(supertest, log); - const test = await deleteAllPrebuiltRuleAssets(es, log); - console.log('\n\n\nHola a todos: ', test, '\n\n\n', '\n\n\n'); + await deleteAllPrebuiltRuleAssets(es, log); }); afterEach(async () => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/retry_delete_by_query_conflicts.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/retry_delete_by_query_conflicts.ts index 912d0871cb238..a5c0ac6c779a6 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/retry_delete_by_query_conflicts.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/retry_delete_by_query_conflicts.ts @@ -26,11 +26,11 @@ export async function retryIfDeleteByQueryConflicts( retryDelay: number = RetryForConflictsDelay ): Promise { const operationResult = await operation(); - if (!operationResult.failures) { + if (!operationResult.failures || operationResult.failures?.length === 0) { return operationResult; } - for (const failure of operationResult?.failures) { + for (const failure of operationResult.failures) { if (failure.status === 409) { // if no retries left, throw it if (retries <= 0) { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_all_prebuilt_rule_assets.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_all_prebuilt_rule_assets.ts index 2f61eb9790bc8..179840ee608fc 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_all_prebuilt_rule_assets.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_all_prebuilt_rule_assets.ts @@ -17,7 +17,7 @@ export const deleteAllPrebuiltRuleAssets = async ( es: Client, logger: ToolingLog ): Promise => { - await retryIfDeleteByQueryConflicts(logger, 'deleteAllPrebuiltRuleAssets', async () => { + await retryIfDeleteByQueryConflicts(logger, deleteAllPrebuiltRuleAssets.name, async () => { return await es.deleteByQuery({ index: SECURITY_SOLUTION_SAVED_OBJECT_INDEX, q: 'type:security-rule',