Search in sources :

Example 21 with StorageFactory

use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.

the class DistributedStorageSecondaryIndexIntegrationTestBase method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    initialize();
    StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
    admin = factory.getAdmin();
    namespace = getNamespace();
    secondaryIndexTypes = getSecondaryIndexTypes();
    createTables();
    storage = factory.getStorage();
    seed = System.currentTimeMillis();
    System.out.println("The seed used in the secondary index integration test is " + seed);
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 22 with StorageFactory

use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.

the class DistributedStorageSinglePartitionKeyIntegrationTestBase method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    initialize();
    StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
    admin = factory.getAdmin();
    namespace = getNamespace();
    partitionKeyTypes = getPartitionKeyTypes();
    createTables();
    storage = factory.getStorage();
    seed = System.currentTimeMillis();
    System.out.println("The seed used in the single partition key integration test is " + seed);
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 23 with StorageFactory

use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.

the class DistributedStorageWithReservedKeywordIntegrationTestBase method beforeAll.

@BeforeAll
public void beforeAll() throws ExecutionException {
    StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
    admin = factory.getAdmin();
    namespace = getNamespace();
    tableName = getTableName();
    columnName1 = getColumnName1();
    columnName2 = getColumnName2();
    columnName3 = getColumnName3();
    columnName4 = getColumnName4();
    columnName5 = getColumnName5();
    createTable();
    storage = factory.getStorage();
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 24 with StorageFactory

use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.

the class DistributedStorageAdminIntegrationTestBase method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    initialize();
    StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
    admin = factory.getAdmin();
    namespace1 = getNamespace1();
    namespace2 = getNamespace2();
    namespace3 = getNamespace3();
    createTables();
    storage = factory.getStorage();
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 25 with StorageFactory

use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.

the class DistributedStorageConditionalMutationIntegrationTestBase method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    initialize();
    StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
    admin = factory.getAdmin();
    namespace = getNamespace();
    createTable();
    storage = factory.getStorage();
    seed = System.currentTimeMillis();
    System.out.println("The seed used in the conditional mutation integration test is " + seed);
    operatorAndDataTypeList = getOperatorAndDataTypeListForTest();
    executorService = Executors.newFixedThreadPool(getThreadNum());
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

StorageFactory (com.scalar.db.service.StorageFactory)37 BeforeAll (org.junit.jupiter.api.BeforeAll)13 Before (org.junit.Before)11 ConsensusCommitAdmin (com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin)8 BeforeClass (org.junit.BeforeClass)8 GrpcConfig (com.scalar.db.storage.rpc.GrpcConfig)7 ConsensusCommitConfig (com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig)7 DatabaseConfig (com.scalar.db.config.DatabaseConfig)6 GrpcTransactionManager (com.scalar.db.transaction.rpc.GrpcTransactionManager)4 GrpcTwoPhaseCommitTransactionManager (com.scalar.db.transaction.rpc.GrpcTwoPhaseCommitTransactionManager)3 Properties (java.util.Properties)3 TableMetadata (com.scalar.db.api.TableMetadata)2 JdbcConfig (com.scalar.db.storage.jdbc.JdbcConfig)1