forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stored access in script field type tests
We have been getting test failures from: DateScriptFieldTypeTests#testDistanceFeatureQuery BooleanScriptFieldTypeTests#testUsedInScript They are new because Lucene now offloads execution entirely to the executor when provided, which may surface test issues that were not issues before. In these examples, stored fields cached in SearchLookup were reused across threads which made us hit the lucene assertion that ensures that stored fields are always pulled and consumed from the same thread. The fixes are relatively simple: recreate the query, or recreate the mock search execution context so you get a clean search lookup with no cached stored fields. Both failures were caused by subsequent searches reusing the same query or the same search execution context.
- Loading branch information
Showing
2 changed files
with
62 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters