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 occasional SearchServiceTests failure #39697

Merged
merged 3 commits into from
Mar 6, 2019

Conversation

cbuescher
Copy link
Member

Currently SearchServiceTests.testCloseSearchContextOnRewriteException can fail
if a refresh happens while we test for the SearchPhaseExecutionException that is
thrown later in the test. The test takes the current Store#refCount and expects
it to be the same after the exception is thrown. If a refresh happens in that
interval however, the refCound will be different, causing the test to fail. This
can be provoked e.g. by running this section in a tight loop.
Switching of refresh for this tests solves the issue.

Closes #39316

@cbuescher cbuescher added >test Issues or PRs that are addressing/adding tests :Search/Search Search-related issues that do not fall into other categories v7.0.0 v8.0.0 v7.2.0 labels Mar 5, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Currently SearchServiceTests.testCloseSearchContextOnRewriteException can fail
if a refresh happens while we test for the SearchPhaseExecutionException that is
thrown later in the test. The test takes the current Store#refCount and expects
it to be the same after the exception is thrown. If a refresh happens in that
interval however, the refCound will be different, causing the test to fail. This
can be provoked e.g. by running this section in a tight loop.
Switching of refresh for this tests solves the issue.

Closes elastic#39316
Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me (although I'm new to this part of the code, so I understand if you want a second opinion).

@cbuescher cbuescher merged commit 07ea33f into elastic:master Mar 6, 2019
cbuescher pushed a commit that referenced this pull request Mar 6, 2019
Currently SearchServiceTests.testCloseSearchContextOnRewriteException can fail
if a refresh happens while we test for the SearchPhaseExecutionException that is
thrown later in the test. The test takes the current Store#refCount and expects
it to be the same after the exception is thrown. If a refresh happens in that
interval however, the refCound will be different, causing the test to fail. This
can be provoked e.g. by running this section in a tight loop.
Switching of refresh for this tests solves the issue.
cbuescher pushed a commit that referenced this pull request Mar 6, 2019
Currently SearchServiceTests.testCloseSearchContextOnRewriteException can fail
if a refresh happens while we test for the SearchPhaseExecutionException that is
thrown later in the test. The test takes the current Store#refCount and expects
it to be the same after the exception is thrown. If a refresh happens in that
interval however, the refCound will be different, causing the test to fail. This
can be provoked e.g. by running this section in a tight loop.
Switching of refresh for this tests solves the issue.
cbuescher pushed a commit that referenced this pull request Mar 6, 2019
Currently SearchServiceTests.testCloseSearchContextOnRewriteException can fail
if a refresh happens while we test for the SearchPhaseExecutionException that is
thrown later in the test. The test takes the current Store#refCount and expects
it to be the same after the exception is thrown. If a refresh happens in that
interval however, the refCound will be different, causing the test to fail. This
can be provoked e.g. by running this section in a tight loop.
Switching of refresh for this tests solves the issue.
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Mar 7, 2019
* 6.7:
  Fix CCR HLRC docs
  Introduce forget follower API (elastic#39718)
  6.6.2 release notes.
  Update release notes for 6.7.0
  Add documentation for min_hash filter (elastic#39671)
  Unmute testIndividualActionsTimeout
  Unmute testFollowIndexAndCloseNode
  Use unwrapped cause to determine if node is closing (elastic#39723)
  Don’t ack if unable to remove failing replica (elastic#39584)
  Wipe Snapshots Before Indices in RestTests (elastic#39662) (elastic#39765)
  Bug fix for AnnotatedTextHighlighter (elastic#39525)
  Fix Snapshot BwC with Version 5.6.x (elastic#39737)
  Fix occasional SearchServiceTests failure (elastic#39697)
  Correct date in daterange-aggregation.asciidoc (elastic#39727)
  Add a note to purge the ingest-geoip plugin (elastic#39553)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test Issues or PRs that are addressing/adding tests v6.7.0 v7.0.0-rc2 v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SearchServiceTests.testCloseSearchContextOnRewriteException failure in CI
4 participants