Skip to content

Make FeatureFactory tests more resilient#75405

Merged
iverase merged 3 commits intoelastic:masterfrom
iverase:fixFeatureFactoryTest
Jul 20, 2021
Merged

Make FeatureFactory tests more resilient#75405
iverase merged 3 commits intoelastic:masterfrom
iverase:fixFeatureFactoryTest

Conversation

@iverase
Copy link
Copy Markdown
Contributor

@iverase iverase commented Jul 16, 2021

Feature factory tests might fail because they are not taking into account the encoding values of the points in the tile. Therefore points might not have the spatial relationships with the tile the test is assuming. This PR makes the test more resilient by making sure the spatial relationships is honour.

fixes #75325
fixes #75358

@iverase iverase added >non-issue :Analytics/Geo Indexing, search aggregations of geo points and shapes v8.0.0 v7.15.0 labels Jul 16, 2021
@iverase iverase requested a review from imotov July 16, 2021 05:15
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jul 16, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Copy link
Copy Markdown
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

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

LGTM

}
if (i == 0 || posLon != prevLon || posLat != prevLat) {
// filter out repeated points
if (numPoints == 0 || posLon != prevLon || posLat != prevLat) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since you are no longer using i, you can probably replace the for loop and remove it completely.

@iverase iverase merged commit 9032b6f into elastic:master Jul 20, 2021
@iverase iverase deleted the fixFeatureFactoryTest branch July 20, 2021 05:59
iverase added a commit that referenced this pull request Jul 20, 2021
making sure the spatial relationships between the tile and the generated points is honour.
ywangd pushed a commit to ywangd/elasticsearch that referenced this pull request Jul 30, 2021
making sure the spatial relationships between the tile and the generated points is honour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Geo Indexing, search aggregations of geo points and shapes >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v7.15.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] SimpleFeatureFactoryTests testMultiPoint failing [CI] FeatureFactoryTests testPoint failing

4 participants