rpuch commented on code in PR #7778:
URL: https://github.com/apache/ignite-3/pull/7778#discussion_r2930550725
##########
modules/network/src/test/java/org/apache/ignite/internal/network/DefaultMessagingServiceTest.java:
##########
@@ -177,15 +182,6 @@ void
messagesSentBeforeChannelStartAreDeliveredInCorrectOrder() throws Exception
}
}
- @Test
- void respondingWhenSenderIsNotInTopologyResultsInFailingFuture() throws
Exception {
Review Comment:
Why is it removed?
##########
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:
It looks like the test actually tests a send to a node that is not in the
topology, but its name (and some code in it) is about staleness. Will the test
behave the same if we don't mark a node as stale?
--
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]