-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 <gbinlong@amazon.com>
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 <gbinlong@amazon.com>
❌ 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 <gbinlong@amazon.com>
❕ 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 <gbinlong@amazon.com> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Add a new randomFieldName method Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> (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 <gbinlong@amazon.com> 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 <gbinlong@amazon.com> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Add a new randomFieldName method Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
* Fix flaky test CopyProcessorTests#testCopyWithRemoveSource Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Remove an existing field to get a non-existing field name Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Add a new randomFieldName method Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
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.