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

[ML] fixing test related to #40963 #41074

Merged
merged 1 commit into from
Apr 11, 2019
Merged

Conversation

benwtrent
Copy link
Member

This removes the possible zero value check of search_time_in_ms. I have seen this before where the search time is actually recorded as zero. This is OK for this test as we really only care about there being valid statistics. The remain checks are enough to achieve this.

closes #40963

@benwtrent benwtrent added >test Issues or PRs that are addressing/adding tests v8.0.0 v7.2.0 :ml/Transform Transform labels Apr 10, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@@ -131,7 +130,6 @@ public void testGetPersistedStatsWithoutTask() throws Exception {
for (Map<String, Object> transformStats : transformsStats) {
Map<String, Object> stat = (Map<String, Object>)transformStats.get("stats");
assertThat(((Integer)stat.get("documents_processed")), greaterThan(0));
assertThat(((Integer)stat.get("search_time_in_ms")), greaterThan(0));
Copy link
Member

Choose a reason for hiding this comment

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

or use greaterThanOrEqualTo

Copy link
Member Author

Choose a reason for hiding this comment

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

@davidkyle I could, but that does not add anything :(. A 0 value is also the default value for when there aren't stats recorded

Copy link
Member

Choose a reason for hiding this comment

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

it proves the field is present... but that should be covered in other tests

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@benwtrent benwtrent merged commit a74755e into elastic:master Apr 11, 2019
@benwtrent benwtrent deleted the fix/test-#40963 branch April 11, 2019 13:16
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 11, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform >test Issues or PRs that are addressing/adding tests v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Failure: DataFrameGetAndGetStatsIT testGetPersistedStatsWithoutTask
4 participants