albertogpz commented on a change in pull request #7108:
URL: https://github.com/apache/geode/pull/7108#discussion_r773389266
##########
File path:
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderCommand.java
##########
@@ -36,7 +44,30 @@
import org.apache.geode.security.ResourcePermission;
public class StopGatewaySenderCommand extends GfshCommand {
+ private final ExecutorService executorService;
+ private SystemManagementService managementService;
+ private BiFunction<String[], String[], Set<DistributedMember>> findMembers;
+ private final Supplier<StopGatewaySenderOnMember> stopperOnMemberFactory;
+
+ @SuppressWarnings("unused") // invoked by spring shell
+ public StopGatewaySenderCommand() {
+ this(newCachedThreadPool("Stop Sender Command Thread ", true),
+ StopGatewaySenderOnMemberWithBeanImpl::new, null, null);
Review comment:
I am passing the `SystemManagmentService` instance and the
`findMembers()` function to avoid using a spy, which is not considered a good
practice unless you are forced to because you are adding tests to legacy code.
I do not know in this case, given that the methods are provided by the base
class, using a spy would be justified.
I have changed the code to pass to the constructor an instance of
`StopGatewaySenderOnMember` instead of the supplier as you have suggested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]