-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Increase probability of synthetic source tests using ignore_malformed #109711
Increase probability of synthetic source tests using ignore_malformed #109711
Conversation
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
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.
One comment. Feel free to merge after addressing it. Thanks @lkts.
@@ -1268,6 +1267,11 @@ public final void testSyntheticEmptyList() throws IOException { | |||
assertThat(syntheticSource(mapper, b -> b.startArray("field").endArray()), equalTo(expected)); | |||
} | |||
|
|||
private boolean shouldUseIgnoreMalformed() { | |||
// 5% of test runs use ignore_malformed | |||
return supportsIgnoreMalformed() && randomDouble() >= 0.05; |
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.
should be <=
instead?
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.
Wow, of course. I guess it's a good stress test to run this on CI :)
@elasticmachine update branch |
@elasticmachine update branch |
In scope of ongoing work on
ignore_malformed
support in synthetic source (#106483) i noticed thatrarely()
used in synthetic source tests to determine application ofignore_malformed
is indeed very rare. Based on my testing it has a probability significantly lower than 1%. Given that a lot of fields now have support for malformed values in synthetic source it seems reasonable to exercise this code more often. This PR changes the logic to applyignore_malformed
in 5% of tests.