Skip to content

Commit

Permalink
Fixes flake tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHassanabad committed Oct 20, 2021
1 parent ea00e60 commit 134b4e6
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export default ({ getService }: FtrProviderContext) => {
await waitForRuleSuccessOrStatus(supertest, id);
await waitForSignalsToBePresent(supertest, 4, [id]);
const signalsOpen = await getSignalsById(supertest, id);
const hits = signalsOpen.hits.hits.map(
(signal) => (signal._source?.host_alias as HostAlias).name
);
const hits = signalsOpen.hits.hits
.map((signal) => (signal._source?.host_alias as HostAlias).name)
.sort();
expect(hits).to.eql(['host name 1', 'host name 2', 'host name 3', 'host name 4']);
});

Expand All @@ -63,7 +63,9 @@ export default ({ getService }: FtrProviderContext) => {
await waitForRuleSuccessOrStatus(supertest, id);
await waitForSignalsToBePresent(supertest, 4, [id]);
const signalsOpen = await getSignalsById(supertest, id);
const hits = signalsOpen.hits.hits.map((signal) => (signal._source?.host as HostAlias).name);
const hits = signalsOpen.hits.hits
.map((signal) => (signal._source?.host as HostAlias).name)
.sort();
expect(hits).to.eql(['host name 1', 'host name 2', 'host name 3', 'host name 4']);
});
});
Expand Down
Loading

0 comments on commit 134b4e6

Please sign in to comment.