jinmeiliao commented on a change in pull request #7108:
URL: https://github.com/apache/geode/pull/7108#discussion_r773352708



##########
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:
       `GfshCommand` has `findMember()` and `getManagementService()` you can 
stubbed out in your tests, I don't think you need the last two params in your 
"test constructor". Also, for the first two parameters, one you are passing the 
object itself, one is a supplier, I suggest you make it consistent, I would 
pass in both in object form (change the supplier to be an instance of 
`StopGatewaySenderOnMember`. 

##########
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);
+    findMembers = this::findMembers;
+  }
+
+  StopGatewaySenderCommand(

Review comment:
       annotate this as `VisisbleForTesting`




-- 
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]


Reply via email to