use of org.apache.ignite.internal.table.impl.DummyInternalTableImpl in project ignite-3 by apache.
the class SchemaValidationTest method createTable.
/**
* Creates a table for tests.
*
* @return The test table.
*/
private InternalTable createTable() {
clusterService = Mockito.mock(ClusterService.class, RETURNS_DEEP_STUBS);
Mockito.when(clusterService.topologyService().localMember().address()).thenReturn(DummyInternalTableImpl.ADDR);
TxManagerImpl txManager = new TxManagerImpl(clusterService, new HeapLockManager());
MessagingService messagingService = MessagingServiceTestUtils.mockMessagingService(txManager);
Mockito.when(clusterService.messagingService()).thenReturn(messagingService);
return new DummyInternalTableImpl(new VersionedRowStore(new ConcurrentHashMapPartitionStorage(), txManager), txManager);
}
use of org.apache.ignite.internal.table.impl.DummyInternalTableImpl in project ignite-3 by apache.
the class TxLocalTest method before.
/**
* Initialize the test state.
*/
@Override
@BeforeEach
public void before() {
ClusterService clusterService = Mockito.mock(ClusterService.class, RETURNS_DEEP_STUBS);
Mockito.when(clusterService.topologyService().localMember().address()).thenReturn(DummyInternalTableImpl.ADDR);
lockManager = new HeapLockManager();
txManager = new TxManagerImpl(clusterService, lockManager);
MessagingService messagingService = MessagingServiceTestUtils.mockMessagingService(txManager);
Mockito.when(clusterService.messagingService()).thenReturn(messagingService);
igniteTransactions = new IgniteTransactionsImpl(txManager);
InternalTable table = new DummyInternalTableImpl(new VersionedRowStore(new ConcurrentHashMapPartitionStorage(), txManager), txManager);
accounts = new TableImpl(table, new DummySchemaManagerImpl(ACCOUNTS_SCHEMA));
InternalTable table2 = new DummyInternalTableImpl(new VersionedRowStore(new ConcurrentHashMapPartitionStorage(), txManager), txManager);
customers = new TableImpl(table2, new DummySchemaManagerImpl(CUSTOMERS_SCHEMA));
}
Aggregations