vldpyatkov commented on a change in pull request #103: URL: https://github.com/apache/ignite-3/pull/103#discussion_r619514322
########## File path: modules/table/src/test/java/org/apache/ignite/table/distributed/DistributedTableTest.java ########## @@ -0,0 +1,349 @@ +/* + * 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.table.distributed; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import org.apache.ignite.internal.affinity.RendezvousAffinityFunction; +import org.apache.ignite.internal.schema.ByteBufferRow; +import org.apache.ignite.internal.schema.Column; +import org.apache.ignite.internal.schema.NativeType; +import org.apache.ignite.internal.schema.Row; +import org.apache.ignite.internal.schema.RowAssembler; +import org.apache.ignite.internal.schema.SchemaDescriptor; +import org.apache.ignite.internal.table.TableImpl; +import org.apache.ignite.internal.table.TableSchemaView; +import org.apache.ignite.internal.table.distributed.command.GetCommand; +import org.apache.ignite.internal.table.distributed.command.InsertCommand; +import org.apache.ignite.internal.table.distributed.command.response.KVGetResponse; +import org.apache.ignite.internal.table.distributed.raft.PartitionCommandListener; +import org.apache.ignite.internal.table.distributed.storage.InternalTableImpl; +import org.apache.ignite.lang.IgniteLogger; +import org.apache.ignite.network.ClusterLocalConfiguration; +import org.apache.ignite.network.ClusterNode; +import org.apache.ignite.network.ClusterService; +import org.apache.ignite.network.ClusterServiceFactory; +import org.apache.ignite.network.message.MessageSerializationRegistry; +import org.apache.ignite.network.scalecube.ScaleCubeClusterServiceFactory; +import org.apache.ignite.raft.client.Peer; +import org.apache.ignite.raft.client.message.RaftClientMessageFactory; +import org.apache.ignite.raft.client.message.impl.RaftClientMessageFactoryImpl; +import org.apache.ignite.raft.client.service.RaftGroupService; +import org.apache.ignite.raft.client.service.impl.RaftGroupServiceImpl; +import org.apache.ignite.raft.server.RaftServer; +import org.apache.ignite.raft.server.impl.RaftServerImpl; +import org.apache.ignite.table.Table; +import org.apache.ignite.table.Tuple; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Distributed internal table tests. + */ +public class DistributedTableTest { + /** Base network port. */ + public static final int NODE_PORT_BASE = 20_000; + + /** Nodes. */ + public static final int NODES = 5; + + /** Partitions. */ + public static final int PARTS = 10; + + /** Factory. */ + private static RaftClientMessageFactory FACTORY = new RaftClientMessageFactoryImpl(); + + /** Network factory. */ + private static final ClusterServiceFactory NETWORK_FACTORY = new ScaleCubeClusterServiceFactory(); + + /** */ + // TODO: IGNITE-14088: Uncomment and use real serializer provider + private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistry(); + + /** Client. */ + private ClusterService client; + + /** Schema. */ + public static SchemaDescriptor SCHEMA = new SchemaDescriptor(1, new Column[] { + new Column("key", NativeType.LONG, false) + }, new Column[] { + new Column("value", NativeType.LONG, false) + }); + + /** Logger. */ + private static final IgniteLogger LOG = IgniteLogger.forClass(DistributedTableTest.class); Review comment: I have checked all the code and moved the logger at the top of declaration everywhere. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
