-
Couldn't load subscription status.
- Fork 128
[system tests] Add new settings to wait for documents being ingested #2429
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to keep this package under the other folder? or should we move it to the parallel folder?
At least, this package requires to spin up an Elastic Agent to read the logs. Should we just add packages that their tests are run fast in other?
| Depends on #2433 |
| test integrations |
| Created or updated PR in integrations repository to test this version. Check elastic/integrations#12900 |
| /test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Added some small suggestions, but feel free to merge.
...stem_test_assert_conditions/data_stream/test/_dev/test/system/test-fields_present-config.yml Show resolved Hide resolved
test/packages/false_positives/failed_fields_present_assert.expected_errors Outdated Show resolved Hide resolved
💚 Build Succeeded
History
cc @mrodm |
Closes #2378
This PR includes new system test settings to allow for different conditions when waiting for the required/needed documents to be ingested into the data stream.
Three new settings have been added:
assert.min_count: minimum number of documents to be ingested in the data stream.assert.fields_present: list of fields that must be present in any document of the given data stream.assert.ingestion_idle_time: minimum period of time that the data stream should not have any new document ingested.this could be useful in those packages that there is no exact number of documents to be ingested, every run could be a different number of documents ingested.Related: [system tests] Add new options to wait for documents before validating fields/mappings #2378 (comment)Examples of the
elastic-packageoutput when these settings are defined:assert.ingestion_idle_time: 20s:assert.fields_present: [target.file, target.expected, target.finish]:assert.min_count: 50:Moreover, these settings can be defined simultaneously. For instance:
In that example, the validation performed by the system test will only run after at least 50 documents have been ingested into the specified data stream, and the two designated fields are prsent in any of the ingested documents.
Author's checklist
How to test this PR locally