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

Fix accounting in ModelLoadingServiceTests #55307

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

davidkyle
Copy link
Member

In the test after the first load event is is not known which models are cached as loading a later one will evict an earlier and the order is not known. The first fix in #55008 recognised this error but got the counting wrong. The models could have been loaded 1 or 2 times not exactly twice

@davidkyle davidkyle added >test Issues or PRs that are addressing/adding tests :ml Machine learning v8.0.0 v7.8.0 labels Apr 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@davidkyle davidkyle requested a review from benwtrent April 16, 2020 13:37
Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

test failures? org.elasticsearch.xpack.ml.inference.loadingservice.ModelLoadingServiceTests.testMaxCachedLimitReached(ModelLoadingServiceTests.java:193)
Actually, there were zero interactions with this mock.

Mockito seems a bit sassy

@davidkyle
Copy link
Member Author

run elasticsearch-ci/1
run elasticsearch-ci/2

@davidkyle
Copy link
Member Author

run elasticsearch-ci/2

3 similar comments
@davidkyle
Copy link
Member Author

run elasticsearch-ci/2

@davidkyle
Copy link
Member Author

run elasticsearch-ci/2

@davidkyle
Copy link
Member Author

run elasticsearch-ci/2

Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

ran each test over 10k times.

even when tests are green, Jenkins finds, uh, a way. :)

I think this is safe to merge.

@davidkyle davidkyle merged commit bbfa5be into elastic:master Apr 21, 2020
@davidkyle davidkyle deleted the model-test-again branch April 21, 2020 16:52
davidkyle added a commit to davidkyle/elasticsearch that referenced this pull request Apr 21, 2020
In the test after the first load event is is not known which models are cached as 
loading a later one will evict an earlier one and the order is not known.
The models could have been loaded 1 or 2 times not exactly twice
davidkyle added a commit that referenced this pull request Apr 21, 2020
In the test after the first load event is is not known which models are cached as 
loading a later one will evict an earlier one and the order is not known.
The models could have been loaded 1 or 2 times not exactly twice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning >test Issues or PRs that are addressing/adding tests v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants