-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[TEST] inject a random index to TestClusterService in BaseQueryTestCase#init #12937
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
[TEST] inject a random index to TestClusterService in BaseQueryTestCase#init #12937
Conversation
d7abd28 to
6daf17a
Compare
|
This looks good. I would also add a method to get the name of the index so we can use it in say Indices Query. |
6daf17a to
da19cfb
Compare
Makes sense, I had forgotten about that, I pushed an update. |
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.
Just an idea, should the index maybe have the same version as the one we are randomly picking in the settings? Maybe not, I think I introduced it there to test both strict and non-strict mapping checks, but maybe we don't need that here.
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.
sure we can do that, I didn't remember we were picking a version randomly to be honest, will look into that ;)
|
Also did a quick look, only one suggestion, otherwise LGTM |
|
@cbuescher I pushed a new commit, hopefully sorted out index settings now. please have a look. |
|
LGTM |
1 similar comment
|
LGTM |
…se#init Some of our next queries to refactor rely on some state taken from the cluster state. That is why we need to mock cluster service and inject an index to it, the index that we simulate the execution of the queries against. The best would be to have multiple indices actually, but that would make our setup a lot more complicated, especially given that IndexQueryParseService is still per index. We might be able to improve that in the future though, for now this is as good as it gets.
a74e433 to
260a929
Compare
Some of our next queries to refactor rely on some state taken from the cluster state. That is why we need to mock cluster service and inject an index to it, the index that we simulate the execution of the queries against. The best would be to have multiple indices actually, but that would make our setup a lot more complicated, especially given that IndexQueryParseService is still per index. We might be able to improve that in the future though, for now this is as good as it gets.