-
Notifications
You must be signed in to change notification settings - Fork 24.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
Disable search context release checks after every test #56673
Conversation
This change adds a way to disable the checks that search contexts are all released after each test in ESTestCase. This is used by ESIntegTestCase to disable these checks if the cluster is shared across all methods (SUITE scope). In this case, the contexts are checked at the end when the cluster is cleared. This fixes integration tests that starts components that perform search requests internally with a fixed delay (e.g.: async search maintenance service). Fixes elastic#55988
Pinging @elastic/es-search (:Search/Search) |
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.
Another way to address the failures would be to plug in a no-op maintenance service in this test. I am not sure how much trouble that would be though, hence I am also ok with this solution.
I meant in the async search tests that are failing due to this check. I wonder if there are other cases where the check may cause problems, and whether it is useful today in between tests, probably not. |
test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
Outdated
Show resolved
Hide resolved
The initial fix doesn't work, we always check the releasing of search contexts before the node is stopped so the maintenance service continues to fire delete by query request. |
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.
still LGTM but even better than before :)
@@ -71,6 +75,25 @@ public SearchTestPlugin() {} | |||
} | |||
} | |||
|
|||
@Before | |||
public void startMaitenanceService() { |
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.
s/Maitenance/Maintenance here and below
This change ensures that the maintenance service that is responsible for deleting the expired response is stopped between each test. This is needed since we check that no search context are in-flight after each test method. Fixes #55988
This change ensures that the maintenance service that is responsible for deleting the expired response is stopped between each test. This is needed since we check that no search context are in-flight after each test method. Fixes #55988
This change ensures that the maintenance service that is responsible for deleting the expired response is stopped between each test. This is needed since we check that no search context are in-flight after each test method. Fixes #55988
This change adds a way to disable the checks that search contexts are all released
after each test in ESTestCase.
This is used by ESIntegTestCase to disable these checks if the cluster is shared
across all methods (SUITE scope). In this case, the contexts are checked at the end
when the cluster is cleared. This fixes integration tests that starts components that
perform search requests internally with a fixed delay (e.g.: async search maintenance service).
Fixes #55988