-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix flaky tests in CopyProcessorTests #12885
Conversation
Signed-off-by: Gao Binlong <[email protected]>
Compatibility status:Checks if related components are compatible with change 0d79235 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] |
❕ Gradle check result for 8e87efb: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12885 +/- ##
============================================
- Coverage 71.42% 71.34% -0.08%
- Complexity 59978 60254 +276
============================================
Files 4985 5011 +26
Lines 282275 283675 +1400
Branches 40946 41117 +171
============================================
+ Hits 201603 202399 +796
- Misses 63999 64554 +555
- Partials 16673 16722 +49 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Gao Binlong <[email protected]>
❌ Gradle check result for 955a84a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@reta ,could you help to review this PR, thank you! |
modules/ingest-common/src/test/java/org/opensearch/ingest/common/CopyProcessorTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gao Binlong <[email protected]>
❕ Gradle check result for 0d79235: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
* Fix flaky test CopyProcessorTests#testCopyWithRemoveSource Signed-off-by: Gao Binlong <[email protected]> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <[email protected]> * Add a new randomFieldName method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 3b10a06) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix flaky test CopyProcessorTests#testCopyWithRemoveSource * Remove an existing field to get a non-existing field name * Add a new randomFieldName method --------- (cherry picked from commit 3b10a06) Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix flaky test CopyProcessorTests#testCopyWithRemoveSource Signed-off-by: Gao Binlong <[email protected]> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <[email protected]> * Add a new randomFieldName method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
* Fix flaky test CopyProcessorTests#testCopyWithRemoveSource Signed-off-by: Gao Binlong <[email protected]> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <[email protected]> * Add a new randomFieldName method Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
Description
When testing CopyProcessorTests#testCopyWithRemoveSource(), even though we use random() to generate field names, but there's a probability that the target field's name conflicts with the existing fields(then the error
target field [] already exists
will be thrown), we need to have a better way to make sure that the target field's name never exists in the document.Another method
testCopyExistingField()
also has the same issue.Related Issues
#12884
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.