-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Conversation
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or use greaterThanOrEqualTo
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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