Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.12] [Security Solution][Detections] Fix flaky indicator enrichment tests (#94241) #94375

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Mar 10, 2021

Backports the following commits to 7.12:

…lastic#94241)

* Make indicator enrichment tests order-independent

Due to the fact that we use named queries to determine matches, and the
fact that the order in which named queries are returned is undefined, we
cannot guarantee a consistent ordering of enrichments if a given event
matches multiple named queries.

Because the ordering is not in itself important to enrichment, in order
to assert the multi-match functionality we must make the assertions
order independent.

* PR feedback

* Since we're only looping for side effects, prefer forEach to map for
  more idiomatic FP.
@rylnd rylnd added the backport label Mar 10, 2021
@rylnd rylnd enabled auto-merge (squash) March 10, 2021 22:01
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@rylnd rylnd merged commit cb620ac into elastic:7.12 Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants