-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Small simplification to MockUtils #99398
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
Small simplification to MockUtils #99398
Conversation
|
Pinging @elastic/es-distributed (Team:Distributed) |
|
Just a suggestion (didn't mention this in #99385 because I didn't want to hold things up on questions of style). |
| public void testActionNames() { | ||
| final ActionFilters actionFilters = mock(ActionFilters.class); | ||
| final TransportService transportService = mock(TransportService.class); | ||
| final TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor(); |
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.
I wonder if we want to keep MockUtils generic and put all common mocks set up there or is it better to have it TransportService specific? If so it could be renamed to TransportServiceMocks?
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.
I don't have any long-term plans for this, maybe we'll collect some other mock-related utils in here.
DiannaHohensee
left a comment
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.
Looks nice and concise, lgtm!
| final ActionFilters actionFilters = mock(ActionFilters.class); | ||
| final BigArrays bigArrays = mock(BigArrays.class); | ||
| final TransportService transportService = mock(TransportService.class); | ||
| final TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor(); |
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.
Thanks for the cleanup :)
No description provided.