ibessonov commented on code in PR #7778:
URL: https://github.com/apache/ignite-3/pull/7778#discussion_r2930595766


##########
modules/network/src/test/java/org/apache/ignite/internal/network/DefaultMessagingServiceTest.java:
##########
@@ -520,6 +516,61 @@ void 
sendByClusterNodeFailsIfActualNodeIdIsDifferent(SendByClusterNodeOperation
         }
     }
 
+    @ParameterizedTest
+    @EnumSource(SendByClusterNodeOperation.class)
+    void sendByClusterNodeToStaleNode(SendByClusterNodeOperation operation) 
throws Exception {
+        UUID missingNodeId = randomUUID();
+
+        var missingNode = new ClusterNodeImpl(missingNodeId, "missing-node", 
new NetworkAddress("127.1.1.1", 2026), null);
+
+        var staleIdDetector = new InMemoryStaleIds();
+        staleIdDetector.markAsStale(missingNodeId);
+
+        try (Services senderServices = createMessagingService(
+                senderNode,
+                senderNetworkConfig,
+                () -> {},
+                messageSerializationRegistry,
+                staleIdDetector
+        )) {
+            assertThat(
+                    operation.sendAction.send(senderServices.messagingService, 
testMessage("test"), missingNode),
+                    willThrow(RecipientLeftException.class)
+            );
+        }
+    }
+
+    @ParameterizedTest
+    @EnumSource(SendByConsistentCoordinateOperation.class)
+    void sendByConsistentIdToStaleNode(SendByConsistentCoordinateOperation 
operation) throws Exception {

Review Comment:
   Let's see, I'll add another test to be safe



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