From 62aead13c11ac2c5f24a29e7beb0ff785634559f Mon Sep 17 00:00:00 2001 From: Michael Olorunnisola Date: Thu, 27 Aug 2020 11:49:40 -0600 Subject: [PATCH] updated comment & fix pausify --- .../resolver/data_access_layer/mocks/emptify_mock.ts | 2 +- .../resolver/data_access_layer/mocks/pausify_mock.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts index da52002720f49..580c5a9baf404 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts @@ -26,7 +26,7 @@ interface Metadata { } /** - * A simple mock dataAccessLayer that allows you to manually pause and resume a request. + * A simple mock dataAccessLayer that allows you to control whether a request comes back with data or empty. */ export function emptifyMock( { diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts index b588ce5bfafe5..2d0feb241d7ef 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts @@ -71,13 +71,13 @@ export function pausifyMock({ } }, resume: (pausableRequests: PausableRequests | PausableRequests[]) => { - const resumeRelatedEventsRequest = pausableRequests.includes('relatedEvents'); - const resumeResolverTreeRequest = pausableRequests.includes('resolverTree'); const resumeEntitiesRequest = pausableRequests.includes('entities'); + const resumeResolverTreeRequest = pausableRequests.includes('resolverTree'); + const resumeRelatedEventsRequest = pausableRequests.includes('relatedEvents'); - if (resumeRelatedEventsRequest && entitiesResolver) entitiesResolver(); + if (resumeEntitiesRequest && entitiesResolver) entitiesResolver(); if (resumeResolverTreeRequest && resolverTreeResolver) resolverTreeResolver(); - if (resumeEntitiesRequest && relatedEventsResolver) relatedEventsResolver(); + if (resumeRelatedEventsRequest && relatedEventsResolver) relatedEventsResolver(); }, dataAccessLayer: { /**