[ML] Fix Flaky Audit Message Assertion in testWithDatastream for RegressionIT and ClassificationIT#138065
Merged
valeriy42 merged 5 commits intoelastic:mainfrom Nov 14, 2025
Merged
Conversation
…rtion in MlNativeDataFrameAnalyticsIntegTestCase to ensure all expected prefixes are found in fetched messages.
…stCase to utilize streams for improved readability and efficiency in checking expected prefixes against fetched messages.
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
… to support index refresh operations during tests.
prwhelan
approved these changes
Nov 14, 2025
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Nov 16, 2025
* main: (135 commits)
Mute org.elasticsearch.upgrades.IndexSortUpgradeIT testIndexSortForNumericTypes {upgradedNodes=1} elastic#138130
Mute org.elasticsearch.upgrades.IndexSortUpgradeIT testIndexSortForNumericTypes {upgradedNodes=2} elastic#138129
Mute org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT testSearchWithRandomDisconnects elastic#138128
[DiskBBQ] avoid EsAcceptDocs bug by calling cost before building iterator (elastic#138127)
Log NOT_PREFERRED shard movements (elastic#138069)
Improve bulk loading of binary doc values (elastic#137995)
Add internal action for getting inference fields and inference results for those fields (elastic#137680)
Address issue with DateFieldMapper#isFieldWithinQuery(...) (elastic#138032)
WriteLoadConstraintDecider: Have separate rate limiting for canRemain and canAllocate decisions (elastic#138067)
Adding NodeContext to TransportBroadcastByNodeAction (elastic#138057)
Mute org.elasticsearch.simdvec.ESVectorUtilTests testSoarDistanceBulk elastic#138117
Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#137909
Backport batched_response_might_include_reduction_failure version to 8.19 (elastic#138046)
Add summary metrics for tdigest fields (elastic#137982)
Add gp-llm-v2 model ID and inference endpoint (elastic#138045)
Various tracing fixes (elastic#137908)
[ML] Fixing KDE evaluate() to return correct ValueAndMagnitude object (elastic#128602)
Mute org.elasticsearch.xpack.shutdown.NodeShutdownIT testStalledShardMigrationProperlyDetected elastic#115697
[ML] Fix Flaky Audit Message Assertion in testWithDatastream for RegressionIT and ClassificationIT (elastic#138065)
[ML] Fix Non-Deterministic Training Set Selection in RegressionIT testTwoJobsWithSameRandomizeSeedUseSameTrainingSet (elastic#138063)
...
# Conflicts:
# rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/200_dense_vector_docvalue_fields.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both
testWithDatastreaminRegressionIT.javaandtestWithDatastreamsinClassificationIT.javasometimes fail becauseassertThatAuditMessagesMatchdoesn't reliably wait for all audit messages to be written. Audit messages are written asynchronously (fire-and-forget), creating a race condition. The tests complete quickly (on a small dataset: 300 training + 50 non-training rows), increasing the likelihood of a race condition. Both tests use the sameassertThatAuditMessagesMatchmethod fromMlNativeDataFrameAnalyticsIntegTestCase, so fixing it resolves both test failures.This PR verifies all expected message prefixes exist, adds robust waiting with timeout and retries, refreshes the notifications index before each check, and restores a more lenient size check, ensuring reliability and thoroughness.
Fixes #128166
Fixes #129457