Skip to content
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 for Flaky test for issue 433 #537

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

vibrantvarun
Copy link
Member

@vibrantvarun vibrantvarun commented Jan 12, 2024

Description

Currently we were using the "phase-results-pipeline" pipeline name at 4 places. This is creating the below issue

    {"error":{"root_cause":[{"type":"resource_not_found_exception","reason":"pipeline [phase-results-pipeline] is missing"}],"type":"resource_not_found_exception","reason":"pipeline [phase-results-pipeline] is missing"},"status":404}

The issue is coming when integ tests run in multithreaded environment.

Consider a scenario where test1 starts executing and it creates a pipeline with name "phase-results-pipeline" . At the same time test2 is about to end(Which also use the search pipeline with the same name) it is at the stage of cleaning up the resources. So when the test 1 tries to use the search pipeline it will not find the pipeline because test2 deleted it. This is the reason of flakiness.

The Fix is

I have used different names in all the impacted test classes

Issues Resolved

#433

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

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.

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91a1202) 84.33% compared to head (0fc02ea) 84.33%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #537   +/-   ##
=========================================
  Coverage     84.33%   84.33%           
  Complexity      533      533           
=========================================
  Files            40       40           
  Lines          1564     1564           
  Branches        244      244           
=========================================
  Hits           1319     1319           
  Misses          133      133           
  Partials        112      112           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vibrantvarun vibrantvarun self-assigned this Jan 12, 2024
@martin-gaievski martin-gaievski merged commit bd1dfbf into opensearch-project:main Jan 12, 2024
94 checks passed
@vibrantvarun vibrantvarun added the backport 2.x Label will add auto workflow to backport PR to 2.x branch label Jan 12, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Varun Jain <[email protected]>
(cherry picked from commit bd1dfbf)
junqiu-lei pushed a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Varun Jain <[email protected]>
(cherry picked from commit bd1dfbf)

Co-authored-by: Varun Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Label will add auto workflow to backport PR to 2.x branch
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants