diff --git a/modules/core/src/test/config/io-manager-benchmark.xml b/modules/core/src/test/config/io-manager-benchmark.xml
index f04aaa987ea80..5f3bd89e16cc9 100644
--- a/modules/core/src/test/config/io-manager-benchmark.xml
+++ b/modules/core/src/test/config/io-manager-benchmark.xml
@@ -34,6 +34,12 @@
+
+
+
+
+
+
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
index 90d9027ad7b67..a06cca4c0705f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java
@@ -17,15 +17,12 @@
package org.apache.ignite.internal.managers.communication;
+import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.plugin.AbstractTestPluginProvider;
-import org.apache.ignite.plugin.ExtensionRegistry;
-import org.apache.ignite.plugin.PluginContext;
import org.apache.ignite.plugin.extensions.communication.Message;
-import org.apache.ignite.plugin.extensions.communication.MessageFactory;
-import org.apache.ignite.plugin.extensions.communication.MessageFactoryProvider;
+import org.apache.ignite.spi.MessagesPluginProvider;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.Test;
@@ -33,8 +30,6 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.apache.ignite.internal.managers.communication.TestOverByteIdMessage.DIRECT_TYPE_OVER_BYTE;
-import static org.apache.ignite.internal.managers.communication.TestValidByteIdMessage.DIRECT_TYPE;
/**
* Send message test.
@@ -43,11 +38,20 @@ public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest
/** Sample count. */
private static final int SAMPLE_CNT = 1;
+ /** */
+ private static final short DIRECT_TYPE = -127;
+
+ /** */
+ private static final short DIRECT_TYPE_OVER_BYTE = 1000;
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
- c.setPluginProviders(new TestPluginProvider());
+ c.setPluginProviders(new MessagesPluginProvider(Map.of(
+ DIRECT_TYPE, GridCommunicationSendTestMessage.class,
+ DIRECT_TYPE_OVER_BYTE, GridCommunicationSendOverByteIdTestMessage.class
+ )));
TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
@@ -64,7 +68,7 @@ public void testSendMessage() throws Exception {
try {
startGridsMultiThreaded(2);
- doSend(new TestValidByteIdMessage());
+ doSend(new GridCommunicationSendTestMessage());
}
finally {
stopAllGrids();
@@ -79,7 +83,7 @@ public void testSendMessageOverByteId() throws Exception {
try {
startGridsMultiThreaded(2);
- doSend(new TestOverByteIdMessage());
+ doSend(new GridCommunicationSendOverByteIdTestMessage());
}
finally {
stopAllGrids();
@@ -94,7 +98,7 @@ public void testSendMessageWithBuffer() throws Exception {
try {
startGridsMultiThreaded(2);
- doSend(new TestValidByteIdMessage());
+ doSend(new GridCommunicationSendTestMessage());
}
finally {
stopAllGrids();
@@ -139,22 +143,4 @@ private void doSend(Message msg) throws Exception {
info(">>> send() time (ms): " + MILLISECONDS.convert(time, NANOSECONDS));
info(">>>");
}
-
- /** */
- public static class TestPluginProvider extends AbstractTestPluginProvider {
- /** {@inheritDoc} */
- @Override public String name() {
- return "TEST_PLUGIN";
- }
-
- /** {@inheritDoc} */
- @Override public void initExtensions(PluginContext ctx, ExtensionRegistry registry) {
- registry.registerExtension(MessageFactoryProvider.class, new MessageFactoryProvider() {
- @Override public void registerAll(MessageFactory factory) {
- factory.register(DIRECT_TYPE, TestValidByteIdMessage::new, new TestValidByteIdMessageSerializer());
- factory.register(DIRECT_TYPE_OVER_BYTE, TestOverByteIdMessage::new, new TestOverByteIdMessageSerializer());
- }
- });
- }
- }
}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendOverByteIdTestMessage.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendOverByteIdTestMessage.java
new file mode 100644
index 0000000000000..07df2655c43f4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendOverByteIdTestMessage.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.managers.communication;
+
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.plugin.extensions.communication.Message;
+
+/** Test message. */
+public class GridCommunicationSendOverByteIdTestMessage implements Message {
+ /** */
+ @Order(0)
+ byte marker;
+}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendTestMessage.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendTestMessage.java
new file mode 100644
index 0000000000000..09a360ea6d455
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendTestMessage.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.managers.communication;
+
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.plugin.extensions.communication.Message;
+
+/** Test message. */
+public class GridCommunicationSendTestMessage implements Message {
+ /** */
+ @Order(0)
+ byte marker;
+}
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
index 45c72def55846..742223eb68ec9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
@@ -90,7 +90,8 @@ public GridIoManagerSelfTest() throws IgniteCheckedException {
public void testSendIfOneOfNodesIsLocalAndTopicIsEnum() throws Exception {
GridTestUtils.assertThrows(log, new Callable