Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

No description provided.

@DaveCTurner DaveCTurner added >non-issue :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. v8.11.0 labels Sep 11, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Sep 11, 2023
@DaveCTurner
Copy link
Contributor Author

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();
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@DiannaHohensee DiannaHohensee left a 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();
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the cleanup :)

@DaveCTurner DaveCTurner merged commit 9f12658 into elastic:main Sep 11, 2023
@DaveCTurner DaveCTurner deleted the 2023/09/11/MockUtils-tidyup-suggestion branch September 11, 2023 15:16
@DaveCTurner DaveCTurner restored the 2023/09/11/MockUtils-tidyup-suggestion branch June 17, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >non-issue Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants