sanpwc commented on code in PR #5245: URL: https://github.com/apache/ignite-3/pull/5245#discussion_r1963236380
########## modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/AbstractColocationTest.java: ########## @@ -68,107 +68,115 @@ import org.apache.ignite.network.NetworkAddress; import org.jetbrains.annotations.Nullable; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.api.extension.ExtendWith; +// TODO: https://issues.apache.org/jira/browse/IGNITE-22522 remove this test after the switching to zone-based replication + +/** + * Base class for tests that require a cluster with zone replication. + */ @ExtendWith(ConfigurationExtension.class) -@ExtendWith(ExecutorServiceExtension.class) @ExtendWith(SystemPropertiesExtension.class) -// TODO: https://issues.apache.org/jira/browse/IGNITE-22522 remove this test after the switching to zone-based replication +@ExtendWith(ExecutorServiceExtension.class) @WithSystemProperty(key = COLOCATION_FEATURE_FLAG, value = "true") -abstract class ItAbstractColocationTest extends IgniteAbstractTest { +public class AbstractColocationTest extends IgniteAbstractTest { private static final ReplicaMessagesFactory REPLICA_MESSAGES_FACTORY = new ReplicaMessagesFactory(); - private static final int NODE_COUNT = 3; - - private static final int BASE_PORT = 20_000; - - private static final String HOST = "localhost"; - - private static final List<NetworkAddress> NODE_ADDRESSES = IntStream.range(0, NODE_COUNT) - .mapToObj(i -> new NetworkAddress(HOST, BASE_PORT + i)) - .collect(toList()); - - private static final StaticNodeFinder NODE_FINDER = new StaticNodeFinder(NODE_ADDRESSES); - - static final int AWAIT_TIMEOUT_MILLIS = 10_000; - - @InjectConfiguration("mock.nodeAttributes: {region = US, storage = SSD}") - private static NodeAttributesConfiguration nodeAttributes1; + protected static final int BASE_PORT = 20_000; - @InjectConfiguration("mock.nodeAttributes: {region = EU, storage = SSD}") - private static NodeAttributesConfiguration nodeAttributes2; - - @InjectConfiguration("mock.nodeAttributes: {region = UK, storage = SSD}") - private static NodeAttributesConfiguration nodeAttributes3; + protected static final int AWAIT_TIMEOUT_MILLIS = 10_000; @InjectConfiguration - private static TransactionConfiguration txConfiguration; + protected SystemLocalConfiguration systemConfiguration; @InjectConfiguration - private static RaftConfiguration raftConfiguration; + protected RaftConfiguration raftConfiguration; @InjectConfiguration - private static SystemLocalConfiguration systemConfiguration; + protected NodeAttributesConfiguration defaultNodeAttributesConfiguration; - @InjectConfiguration - private static ReplicationConfiguration replicationConfiguration; + @InjectConfiguration("mock.profiles = {" + DEFAULT_STORAGE_PROFILE + ".engine = aipersist, test.engine=test}") + protected StorageConfiguration storageConfiguration; @InjectConfiguration - private static MetaStorageConfiguration metaStorageConfiguration; - - @InjectConfiguration("mock.profiles = {" + DEFAULT_STORAGE_PROFILE + ".engine = aipersist, test.engine=test}") - private static StorageConfiguration storageConfiguration; + protected MetaStorageConfiguration metaStorageConfiguration; @InjectConfiguration - GcConfiguration gcConfiguration; + protected ReplicationConfiguration replicationConfiguration; @InjectExecutorService - private static ScheduledExecutorService scheduledExecutorService; + protected ScheduledExecutorService scheduledExecutorService; Review Comment: Idea claims that it's possible to have all configuration fields except gcConfiguration and txConfiguration as private and the last two as package-private. Similar for startNodes() -> startCluster and some other methods that were package private and now protected. Do you really think that we will have colocation tests somewhere besides `org.apache.ignite.internal.partition.replicator`? -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org