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

Move geo_shape disk usage test to the spatial module #88555

Merged
merged 2 commits into from
Jul 18, 2022

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 14, 2022

Adds a new SpatialDiskUsageIT test in the spatial module to test fields that the module adds.

@iverase iverase added >test Issues or PRs that are addressing/adding tests :Search/Search Search-related issues that do not fall into other categories v8.4.0 labels Jul 14, 2022
@iverase iverase requested a review from dnhatn July 14, 2022 14:51
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jul 14, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@iverase
Copy link
Contributor Author

iverase commented Jul 14, 2022

open #88555

@elasticmachine run elasticsearch-ci/part-1

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM. I left two minor comments. Thanks @iverase.


@SuppressWarnings("unchecked")
private int extractValue(String[] path, Map<String, Object> objects) {
for (int i = 0; i < path.length - 1; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we delegate these to XContentMapValues#extractValue instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes, thanks!


value = extractValue(new String[] { "test-index", "fields", "_seq_no", "inverted_index", "total_in_bytes" }, objects);
assertThat(value, equalTo(0));
value = extractValue(new String[] { "test-index", "fields", "_seq_no", "stored_fields_in_bytes" }, objects);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use the path with separators (i.e., "test-index\fields_seq_no\stored_fields_in_bytes") or varags like extractValue in XContentMapValues?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@iverase iverase merged commit 2064595 into elastic:master Jul 18, 2022
@iverase iverase deleted the SpatialDiskUsageIT branch July 18, 2022 05:15
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 Team:Search Meta label for search team >test Issues or PRs that are addressing/adding tests v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants