This is an automated email from the ASF dual-hosted git repository.

tkalkirill pushed a commit to branch ignite-26752
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 99cd4bed6ee7da6d653e8ee7573df6a36c0bcf78
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Fri Oct 17 13:10:08 2025 +0300

    IGNITE-26752 wip
---
 modules/arch-test/build.gradle                     |   1 +
 .../RaftCommandsUnitCompatibilityArchTest.java     | 131 +++++++++++++++++++++
 .../commands/CmgCommandsCompatibilityTest.java     |   9 ++
 .../MetastorageCommandsCompatibilityTest.java      |  16 +++
 .../PartitionCommandsCompatibilityTest.java        |  11 ++
 .../raft/BaseCommandsCompatibilityTest.java        |  12 ++
 .../ReplicatorCommandsCompatibilityTest.java       |   2 +
 .../tx/message/TxCommandsCompatibilityTest.java    |   1 +
 8 files changed, 183 insertions(+)

diff --git a/modules/arch-test/build.gradle b/modules/arch-test/build.gradle
index 584d8ee2661..995271a6ab1 100644
--- a/modules/arch-test/build.gradle
+++ b/modules/arch-test/build.gradle
@@ -37,6 +37,7 @@ dependencies {
     testImplementation libs.archunit.core
     testImplementation libs.archunit.junit5
     testImplementation testFixtures(project(':ignite-core'))
+    testImplementation testFixtures(project(':ignite-raft'))
 }
 
 tasks.withType(Test).configureEach {
diff --git 
a/modules/arch-test/src/test/java/org/apache/ignite/internal/RaftCommandsUnitCompatibilityArchTest.java
 
b/modules/arch-test/src/test/java/org/apache/ignite/internal/RaftCommandsUnitCompatibilityArchTest.java
new file mode 100644
index 00000000000..41087d9477f
--- /dev/null
+++ 
b/modules/arch-test/src/test/java/org/apache/ignite/internal/RaftCommandsUnitCompatibilityArchTest.java
@@ -0,0 +1,131 @@
+/*
+ * 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;
+
+import static com.tngtech.archunit.base.DescribedPredicate.and;
+import static 
com.tngtech.archunit.core.domain.properties.CanBeAnnotated.Predicates.annotatedWith;
+import static 
com.tngtech.archunit.core.importer.ImportOption.Predefined.DO_NOT_INCLUDE_TESTS;
+import static 
com.tngtech.archunit.core.importer.ImportOption.Predefined.DO_NOT_INCLUDE_TEST_FIXTURES;
+import static com.tngtech.archunit.lang.SimpleConditionEvent.violated;
+import static java.util.stream.Collectors.toSet;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.not;
+
+import com.tngtech.archunit.core.domain.JavaClass;
+import com.tngtech.archunit.core.domain.JavaClasses;
+import com.tngtech.archunit.core.domain.JavaMethod;
+import com.tngtech.archunit.core.importer.ClassFileImporter;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.lang.ArchCondition;
+import com.tngtech.archunit.lang.ArchRule;
+import com.tngtech.archunit.lang.ConditionEvents;
+import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
+import java.util.List;
+import java.util.Set;
+import org.apache.ignite.internal.network.annotations.Transferable;
+import org.apache.ignite.internal.raft.BaseCommandsCompatibilityTest;
+import 
org.apache.ignite.internal.raft.BaseCommandsCompatibilityTest.TestCommand;
+import org.apache.ignite.internal.raft.Command;
+import org.apache.ignite.lang.IgniteTestImportOption;
+import org.apache.ignite.lang.LocationProvider.RootLocationProvider;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+
+/**
+ * Tests that all unit commands are tested for backward compatibility.
+ */
+@AnalyzeClasses(
+        packages = "org.apache.ignite",
+        importOptions = IgniteTestImportOption.class,
+        locations = RootLocationProvider.class
+)
+public class RaftCommandsUnitCompatibilityArchTest {
+    @ArchTest
+    void test(JavaClasses classes) {
+        Set<String> raftCommands = toClassNames(collectRaftCommands());
+
+        assertThat(raftCommands, not(empty()));
+
+        ArchRule archRule = ArchRuleDefinition.classes()
+                .that()
+                .areAssignableTo(BaseCommandsCompatibilityTest.class)
+                .and()
+                .containAnyMethodsThat(and(
+                        annotatedWith(TestCommand.class),
+                        
annotatedWith(Test.class).or(annotatedWith(ParameterizedTest.class))
+                ))
+                
.should(shouldContainsTestMethodsForRaftCommands(raftCommands));
+
+        archRule.check(classes);
+
+        assertThat(
+                "There are still some raft commands that haven't been tested; 
for example, see the successors of "
+                        + BaseCommandsCompatibilityTest.class.getName(),
+                raftCommands,
+                empty()
+        );
+    }
+
+    private static ArchCondition<JavaClass> 
shouldContainsTestMethodsForRaftCommands(Set<String> raftCommands) {
+        return new ArchCondition<>("should contain test methods for raft 
commands") {
+            @Override
+            public void check(JavaClass item, ConditionEvents events) {
+                System.out.println("Checking class: " + item.getName());
+
+                for (JavaMethod method : item.getMethods()) {
+                    if (hasTestMethodTestCommand(method)) {
+                        String testedRaftCommandClass = 
method.getAnnotationOfType(TestCommand.class).value().getName();
+
+                        if (!raftCommands.remove(testedRaftCommandClass)) {
+                            events.add(violated(
+                                    method,
+                                    "another method is already testing the 
command: " + testedRaftCommandClass
+                            ));
+                        }
+                    }
+                }
+            }
+        };
+    }
+
+    private static Set<JavaClass> collectRaftCommands() {
+        // Uses its own JavaClasses to avoid OutOfMemoryError from a large 
number of classes.
+        JavaClasses classes = new ClassFileImporter()
+                .withImportOptions(List.of(DO_NOT_INCLUDE_TESTS, 
DO_NOT_INCLUDE_TEST_FIXTURES))
+                .importPackages("org.apache.ignite");
+
+        JavaClass raftCommandJavaClass = classes.get(Command.class);
+
+        return classes.stream()
+                .filter(JavaClass::isInterface)
+                .filter(javaClass -> 
javaClass.isAnnotatedWith(Transferable.class))
+                .filter(javaClass -> 
javaClass.getAllRawInterfaces().contains(raftCommandJavaClass))
+                .collect(toSet());
+    }
+
+    private static Set<String> toClassNames(Set<JavaClass> classes) {
+        return classes.stream().map(JavaClass::getName).collect(toSet());
+    }
+
+    private static boolean hasTestMethodTestCommand(JavaMethod method) {
+        return method.isAnnotatedWith(TestCommand.class)
+                && (method.isAnnotatedWith(Test.class) || 
method.isAnnotatedWith(ParameterizedTest.class));
+    }
+}
diff --git 
a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/raft/commands/CmgCommandsCompatibilityTest.java
 
b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/raft/commands/CmgCommandsCompatibilityTest.java
index c7974d80b64..25cc3ebbac8 100644
--- 
a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/raft/commands/CmgCommandsCompatibilityTest.java
+++ 
b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/raft/commands/CmgCommandsCompatibilityTest.java
@@ -61,6 +61,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(ChangeMetaStorageInfoCommand.class)
     void testChangeMetaStorageInfoCommand() {
         ChangeMetaStorageInfoCommand command = 
decodeCommand("CDADCG1zTm9kZTIIbXNOb2RlMQEr");
 
@@ -69,6 +70,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(InitCmgStateCommand.class)
     void testInitCmgStateCommand() {
         InitCmgStateCommand command = decodeCommand(
                 
"CCkIPgg/AAAAAAAAAAAqAAAAAAAAAEUNY2x1c3Rlck5hbWUxAwljbWdOb2RlMQljbWdOb2RlMgIAAAAAAAAAACoAAAAAAAAARQxpbml0Q29uZmlnMQMIbXNOb"
@@ -81,6 +83,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(JoinReadyCommand.class)
     void testJoinReadyCommand() {
         JoinReadyCommand command = decodeCommand(
                 
"CC0IPQZob3N0MQAAAAAAAAAAKgAAAAAAAABFBm5hbWUx6QcCCXByb2ZpbGUxAghzeXNLZXkxCHN5c1ZhbDECCXVzZXJLZXkxCXVzZXJWYWwx"
@@ -90,6 +93,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(JoinRequestCommand.class)
     void testJoinRequestCommand() {
         JoinRequestCommand command = decodeCommand(
                 
"CCwIPwAAAAAAAAAAKgAAAAAAAABFDWNsdXN0ZXJOYW1lMQg9Bmhvc3QxAAAAAAAAAAAqAAAAAAAAAEUGbmFtZTHpBwIJcHJvZmlsZTECCHN5c0tleTEIc3lzV"
@@ -102,6 +106,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(NodesLeaveCommand.class)
     void testNodesLeaveCommand() {
         NodesLeaveCommand command = decodeCommand(
                 
"CC4CCD0GaG9zdDEAAAAAAAAAACoAAAAAAAAARQZuYW1lMekHAglwcm9maWxlMQIIc3lzS2V5MQhzeXNWYWwxAgl1c2VyS2V5MQl1c2VyVmFsMQ=="
@@ -111,6 +116,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(ReadLogicalTopologyCommand.class)
     void testReadLogicalTopologyCommand() {
         Command command = decodeCommand("CCs=");
 
@@ -118,6 +124,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(ReadMetaStorageInfoCommand.class)
     void testReadMetaStorageInfoCommand() {
         Command command = decodeCommand("CEM=");
 
@@ -125,6 +132,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(ReadStateCommand.class)
     void testReadStateCommand() {
         Command command = decodeCommand("CCo=");
 
@@ -132,6 +140,7 @@ public class CmgCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest
     }
 
     @Test
+    @TestCommand(ReadValidatedNodesCommand.class)
     void testReadValidatedNodesCommand() {
         Command command = decodeCommand("CC8=");
 
diff --git 
a/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/command/MetastorageCommandsCompatibilityTest.java
 
b/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/command/MetastorageCommandsCompatibilityTest.java
index e382ac99ce4..ba92657a534 100644
--- 
a/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/command/MetastorageCommandsCompatibilityTest.java
+++ 
b/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/command/MetastorageCommandsCompatibilityTest.java
@@ -78,6 +78,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(CompactionCommand.class)
     void testCompactionCommand() {
         CompactionCommand command = decodeCommand("cEkrR0Y=");
 
@@ -87,6 +88,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(EvictIdempotentCommandsCacheCommand.class)
     void testEvictIdempotentCommandsCacheCommand() {
         EvictIdempotentCommandsCacheCommand command = 
decodeCommand("cEhlR0Y=");
 
@@ -96,6 +98,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetAllCommand.class)
     void testGetAllCommand() {
         GetAllCommand command = decodeCommand("cB8DAwVrZXkxAwVrZXkyKw==");
 
@@ -104,6 +107,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetChecksumCommand.class)
     void testGetChecksumCommand() {
         GetChecksumCommand command = decodeCommand("cCMr");
 
@@ -111,6 +115,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetCommand.class)
     void testGetCommand() {
         GetCommand command = decodeCommand("cBUDBWtleTEr");
 
@@ -119,6 +124,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetCurrentRevisionsCommand.class)
     void testGetCurrentRevisionsCommand() {
         Command command = decodeCommand("cCI=");
 
@@ -126,6 +132,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetPrefixCommand.class)
     void testGetPrefixCommand() {
         GetPrefixCommand command = 
decodeCommand("cD5lAQMIcHJlZml4MQ1wcmV2aW91c0tleTEr");
 
@@ -137,6 +144,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(GetRangeCommand.class)
     void testGetRangeCommand() {
         GetRangeCommand command = 
decodeCommand("cD1lAQMJa2V5RnJvbTEDB2tleVRvMQ1wcmV2aW91c0tleTEr");
 
@@ -149,6 +157,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(InvokeCommand.class)
     void testInvokeCommand() {
         InvokeCommand command = decodeCommand(
                 
"cAvfAQIDCGV4aXN0czEOAt8BBgMIcmVtb3ZlMQQA3wEMRwAAAAAAAAAAKgAAAAAAAABFR0YC3wEGAwVwdXQxAwMFdmFsMQ=="
@@ -169,6 +178,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(MultiInvokeCommand.class)
     void testMultiInvokeCommand() {
         MultiInvokeCommand command = decodeCommand(
                 
"cAzfAQxHAAAAAAAAAAAqAAAAAAAAAEXfAQnfAQvfAQgC3wEGAwVwdXQxAwMFdmFsMd8BBwMCAd8BBd8BBd8BAgMLdG9tYnN0b25lMRDfAQIDDm5vdFRvbWJzd"
@@ -209,6 +219,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(PutAllCommand.class)
     void testPutAllCommand() {
         PutAllCommand command = 
decodeCommand("cDNHAwMFa2V5MQMFa2V5MkYDAwV2YWwxAwV2YWwy");
 
@@ -219,6 +230,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(PutCommand.class)
     void testPutCommand() {
         PutCommand command = decodeCommand("cClHAwVrZXkxRgMFdmFsMQ==");
 
@@ -229,6 +241,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(RemoveAllCommand.class)
     void testRemoveAllCommand() {
         RemoveAllCommand command = decodeCommand("cDRHAwMFa2V5MQMFa2V5MkY=");
 
@@ -238,6 +251,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(RemoveByPrefixCommand.class)
     void testRemoveByPrefixCommand() {
         RemoveByPrefixCommand command = decodeCommand("cDVHAwhwcmVmaXgxRg==");
 
@@ -247,6 +261,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(RemoveCommand.class)
     void testRemoveCommand() {
         RemoveCommand command = decodeCommand("cCpHAwVrZXkxRg==");
 
@@ -256,6 +271,7 @@ public class MetastorageCommandsCompatibilityTest extends 
BaseCommandsCompatibil
     }
 
     @Test
+    @TestCommand(SyncTimeCommand.class)
     void testSyncTimeCommand() {
         SyncTimeCommand command = decodeCommand("cEcrR0Y=");
 
diff --git 
a/modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/network/command/PartitionCommandsCompatibilityTest.java
 
b/modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/network/command/PartitionCommandsCompatibilityTest.java
index 460f2c84de8..53ae547f799 100644
--- 
a/modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/network/command/PartitionCommandsCompatibilityTest.java
+++ 
b/modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/network/command/PartitionCommandsCompatibilityTest.java
@@ -79,6 +79,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(BuildIndexCommand.class)
     void testBuildIndexCommand() {
         BuildIndexCommand command = 
decodeCommand("Ci0BRgIAAAAAAAAAACoAAAAAAAAARQ==");
 
@@ -88,6 +89,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(BuildIndexCommandV2.class)
     void testBuildIndexCommandV2() {
         BuildIndexCommandV2 command = 
decodeCommand("CjIBRgIAAAAAAAAAACoAAAAAAAAARQg=");
 
@@ -98,6 +100,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(FinishTxCommandV1.class)
     void testFinishTxCommandV1() {
         FinishTxCommandV1 command = 
decodeCommand("CikBSAFHAgkrLSJGAAAAAAAAAAAqAAAAAAAAAEU=");
 
@@ -111,6 +114,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(FinishTxCommandV2.class)
     void testFinishTxCommandV2() {
         FinishTxCommandV2 command = 
decodeCommand("CjMBSAFHAgYVCSwXDAMtIkYAAAAAAAAAACoAAAAAAAAARQ==");
 
@@ -124,6 +128,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(UpdateAllCommand.class)
     void testUpdateAllCommand() {
         UpdateAllCommand command = decodeCommand(
                 
"CisBRwErAgAAAAAAAAAAKgAAAAAAAABFChkKEwMEAQIDAdMJRgkrLSIAAAAAAAAAACoAAAAAAAAARQAAAAAAAAAAKgAAAAAAAABF"
@@ -140,6 +145,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(UpdateAllCommandV2.class)
     void testUpdateAllCommandV2() {
         UpdateAllCommandV2 command = decodeCommand(
                 
"CjEBRwErAgAAAAAAAAAAKgAAAAAAAABFChkKEwMEAQIDAdMJRggJKy0iAAAAAAAAAAAqAAAAAAAAAEUAAAAAAAAAACoAAAAAAAAARQ=="
@@ -157,6 +163,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(UpdateCommand.class)
     void testUpdateCommand() {
         UpdateCommand command = decodeCommand(
                 
"CiwBRwErChkKEwMEAQIDAdMJAAAAAAAAAAAqAAAAAAAAAEVGCSstIgAAAAAAAAAAKgAAAAAAAABFAAAAAAAAAAAqAAAAAAAAAEU="
@@ -174,6 +181,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(UpdateCommandV2.class)
     void testUpdateCommandV2() {
         UpdateCommandV2 command = decodeCommand(
                 
"CjABRwErChkKEwMEAQIDAdMJAAAAAAAAAAAqAAAAAAAAAEVGCAkrLSIAAAAAAAAAACoAAAAAAAAARQAAAAAAAAAAKgAAAAAAAABF"
@@ -192,6 +200,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(UpdateMinimumActiveTxBeginTimeCommand.class)
     void testUpdateMinimumActiveTxBeginTimeCommand() {
         UpdateMinimumActiveTxBeginTimeCommand command = 
decodeCommand("Ci5HRtMJ");
 
@@ -201,6 +210,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(WriteIntentSwitchCommand.class)
     void testWriteIntentSwitchCommand() {
         WriteIntentSwitchCommand command = 
decodeCommand("CioBSAFHRgAAAAAAAAAAKgAAAAAAAABF");
 
@@ -213,6 +223,7 @@ public class PartitionCommandsCompatibilityTest extends 
BaseCommandsCompatibilit
     }
 
     @Test
+    @TestCommand(WriteIntentSwitchCommandV2.class)
     void testWriteIntentSwitchCommandV2() {
         WriteIntentSwitchCommandV2 command = 
decodeCommand("Ci8BSAFHRgMJCAAAAAAAAAAAKgAAAAAAAABF");
 
diff --git 
a/modules/raft/src/testFixtures/java/org/apache/ignite/internal/raft/BaseCommandsCompatibilityTest.java
 
b/modules/raft/src/testFixtures/java/org/apache/ignite/internal/raft/BaseCommandsCompatibilityTest.java
index 207880ab013..2db6dafcce9 100644
--- 
a/modules/raft/src/testFixtures/java/org/apache/ignite/internal/raft/BaseCommandsCompatibilityTest.java
+++ 
b/modules/raft/src/testFixtures/java/org/apache/ignite/internal/raft/BaseCommandsCompatibilityTest.java
@@ -17,6 +17,10 @@
 
 package org.apache.ignite.internal.raft;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.util.Base64;
 import java.util.Collection;
 import java.util.UUID;
@@ -93,4 +97,12 @@ public abstract class BaseCommandsCompatibilityTest extends 
BaseIgniteAbstractTe
     protected static HybridTimestamp commitTimestamp() {
         return HybridTimestamp.hybridTimestamp(71);
     }
+
+    /** Annotation to indicate which raft command is being tested. */
+    @Target(ElementType.METHOD)
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface TestCommand {
+        /** Raft command is being tested. */
+        Class<? extends Command> value();
+    }
 }
diff --git 
a/modules/replicator/src/test/java/org/apache/ignite/internal/replicator/ReplicatorCommandsCompatibilityTest.java
 
b/modules/replicator/src/test/java/org/apache/ignite/internal/replicator/ReplicatorCommandsCompatibilityTest.java
index f2de6013200..f55f5dd0969 100644
--- 
a/modules/replicator/src/test/java/org/apache/ignite/internal/replicator/ReplicatorCommandsCompatibilityTest.java
+++ 
b/modules/replicator/src/test/java/org/apache/ignite/internal/replicator/ReplicatorCommandsCompatibilityTest.java
@@ -51,6 +51,7 @@ public class ReplicatorCommandsCompatibilityTest extends 
BaseCommandsCompatibili
     }
 
     @Test
+    @TestCommand(SafeTimeSyncCommand.class)
     void testSafeTimeSyncCommand() {
         SafeTimeSyncCommand command = decodeCommand("CSlH");
 
@@ -58,6 +59,7 @@ public class ReplicatorCommandsCompatibilityTest extends 
BaseCommandsCompatibili
     }
 
     @Test
+    @TestCommand(PrimaryReplicaChangeCommand.class)
     void testPrimaryReplicaChangeCommand() {
         PrimaryReplicaChangeCommand command = 
decodeCommand("CSorAAAAAAAAAAAqAAAAAAAAAEUGbm9kZTE=");
 
diff --git 
a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/message/TxCommandsCompatibilityTest.java
 
b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/message/TxCommandsCompatibilityTest.java
index f9ea3e748de..92e906285b3 100644
--- 
a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/message/TxCommandsCompatibilityTest.java
+++ 
b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/message/TxCommandsCompatibilityTest.java
@@ -45,6 +45,7 @@ public class TxCommandsCompatibilityTest extends 
BaseCommandsCompatibilityTest {
     }
 
     @Test
+    @TestCommand(VacuumTxStatesCommand.class)
     void testVacuumTxStatesCommand() {
         VacuumTxStatesCommand command = 
decodeCommand("Bg4CAAAAAAAAAAAqAAAAAAAAAEU=");
 

Reply via email to