wernerdv commented on code in PR #12161:
URL: https://github.com/apache/ignite/pull/12161#discussion_r2876656873
##########
modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerWarningsTest.java:
##########
@@ -131,6 +140,77 @@ public class GridCachePartitionExchangeManagerWarningsTest
extends GridCommonAbs
return cfg;
}
+ /**
+ *
+ */
+ @Test
+ public void testSingleMessageErrorWarnings() throws Exception {
+ final long waitingTimeout = 5_000;
+
+ LogListener logListener = LogListener.matches("Failed to send local
partitions").atLeast(1).build();
+ testLog = new ListeningTestLogger(log, logListener);
+
+ final CountDownLatch beforeSend = new CountDownLatch(1);
+ final CountDownLatch proceed = new CountDownLatch(1);
+
+ final AtomicReference<UUID> crdIdRef = new AtomicReference<>();
+
+ spiFactory = () -> new TcpCommunicationSpi() {
+ @Override public void sendMessage(
+ ClusterNode node,
+ Message msg,
+ IgniteInClosure<IgniteException> ackC
+ ) throws IgniteSpiException {
+ boolean isSingleMsg = ((GridIoMessage)msg).message()
instanceof GridDhtPartitionsSingleMessage;
+ UUID crdId = crdIdRef.get();
+
+ if (isSingleMsg && node != null && crdId != null &&
crdId.equals(node.id()) ) {
Review Comment:
```suggestion
if (isSingleMsg && node != null && crdId != null &&
crdId.equals(node.id())) {
```
--
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]