rpuch commented on code in PR #7778:
URL: https://github.com/apache/ignite-3/pull/7778#discussion_r2930634724
##########
modules/network/src/test/java/org/apache/ignite/internal/network/DefaultMessagingServiceTest.java:
##########
@@ -520,6 +516,82 @@ 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 {
+ assumeThat(operation,
is(not(SendByConsistentCoordinateOperation.SEND_BY_ADDRESS)));
+
+ UUID missingNodeId = randomUUID();
+ String missingNodeName = "missing-node";
+
+ var missingNode = new ClusterNodeImpl(missingNodeId, missingNodeName,
new NetworkAddress("127.1.1.1", 2026), null);
+
+ var staleIdDetector = new InMemoryStaleIds();
+ staleIdDetector.markAsStale(missingNodeId);
+
+
when(topologyService.getByConsistentId(missingNodeName)).thenReturn(null);
Review Comment:
Why is this needed here? It is still about a missing node, not about a stale
node
--
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]