sanpwc commented on a change in pull request #321:
URL: https://github.com/apache/ignite-3/pull/321#discussion_r704226450



##########
File path: 
modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/RaftGroupServiceTest.java
##########
@@ -537,17 +806,32 @@ private void mockLeaderRequest(boolean delay) {
      * @param mode Mock mode.
      */
     private void mockSnapshotRequest(int mode) {
-        when(messagingService.invoke(any(NetworkAddress.class), 
any(SnapshotRequest.class), anyLong()))
+        when(messagingService.invoke(any(NetworkAddress.class), 
any(CliRequests.SnapshotRequest.class), anyLong()))
             .then(invocation -> {
                 if (mode == 0) {
-                    return 
completedFuture(FACTORY.raftErrorResponse().errorCode(RaftErrorCode.SNAPSHOT).
-                        errorMessage("Failed to create a snapshot").build());
+                    return 
completedFuture(FACTORY.errorResponse().errorCode(RaftError.UNKNOWN.getNumber()).
+                        errorMsg("Failed to create a snapshot").build());
                 }
                 else
                     return failedFuture(new IgniteInternalException("Very 
bad"));
             });
     }
 
+    /** */
+    private void mockAddLearners(String groupId, List<String> addLearners, 
List<String> resultLearners) {
+        when(messagingService.invoke(any(NetworkAddress.class),
+            eq(FACTORY.addLearnersRequest()
+                .learnersList(addLearners)
+                .groupId(groupId).build()), anyLong()))
+            .then(invocation ->
+                
completedFuture(FACTORY.learnersOpResponse().newLearnersList(resultLearners).build()));
+
+    }
+
+    private List<String> peersToIds(List<Peer> peers) {

Review comment:
       javadoc




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