Search in sources :

Example 1 with DbClientImplUnitTester

use of com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester in project coprhd-controller by CoprHD.

the class LazyLoadTests method setupTest.

@Before
public void setupTest() {
    DbClientImplUnitTester dbClient = new DbClientImplUnitTester();
    dbClient.setCoordinatorClient(_coordinator);
    dbClient.setDbVersionInfo(sourceVersion);
    dbClient.setBypassMigrationLock(true);
    _encryptionProvider.setCoordinator(_coordinator);
    dbClient.setEncryptionProvider(_encryptionProvider);
    DbClientContext localCtx = new DbClientContext();
    localCtx.setClusterName("Test");
    localCtx.setKeyspaceName("Test");
    dbClient.setLocalContext(localCtx);
    VdcUtil.setDbClient(dbClient);
    dbClient.setBypassMigrationLock(false);
    dbClient.setDrUtil(new DrUtil(_coordinator));
    dbClient.start();
    _dbClient = dbClient;
    modelClient = new DbModelClientImpl(_dbClient);
}
Also used : DbClientContext(com.emc.storageos.db.client.impl.DbClientContext) DbModelClientImpl(com.emc.storageos.db.client.impl.DbModelClientImpl) DbClientImplUnitTester(com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester) DrUtil(com.emc.storageos.coordinator.client.service.DrUtil) Before(org.junit.Before)

Example 2 with DbClientImplUnitTester

use of com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester in project coprhd-controller by CoprHD.

the class PlacementTests method setupTest.

@Before
public void setupTest() {
    DbClientImplUnitTester dbClient = new DbClientImplUnitTester();
    dbClient.setCoordinatorClient(_coordinator);
    dbClient.setDbVersionInfo(sourceVersion);
    dbClient.setBypassMigrationLock(true);
    _encryptionProvider.setCoordinator(_coordinator);
    dbClient.setEncryptionProvider(_encryptionProvider);
    DbClientContext localCtx = new DbClientContext();
    localCtx.setClusterName("Test");
    localCtx.setKeyspaceName("Test");
    dbClient.setLocalContext(localCtx);
    VdcUtil.setDbClient(dbClient);
    dbClient.setBypassMigrationLock(false);
    dbClient.start();
    _dbClient = dbClient;
}
Also used : DbClientContext(com.emc.storageos.db.client.impl.DbClientContext) DbClientImplUnitTester(com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester) Before(org.junit.Before)

Example 3 with DbClientImplUnitTester

use of com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester in project coprhd-controller by CoprHD.

the class ExportUtilsTests method setupTest.

@Before
public void setupTest() {
    DbClientImplUnitTester dbClient = new DbClientImplUnitTester();
    dbClient.setCoordinatorClient(_coordinator);
    dbClient.setDbVersionInfo(sourceVersion);
    dbClient.setBypassMigrationLock(true);
    _encryptionProvider.setCoordinator(_coordinator);
    dbClient.setEncryptionProvider(_encryptionProvider);
    DbClientContext localCtx = new DbClientContext();
    localCtx.setClusterName("Test");
    localCtx.setKeyspaceName("Test");
    dbClient.setLocalContext(localCtx);
    VdcUtil.setDbClient(dbClient);
    dbClient.setBypassMigrationLock(false);
    dbClient.start();
    _dbClient = dbClient;
}
Also used : DbClientContext(com.emc.storageos.db.client.impl.DbClientContext) DbClientImplUnitTester(com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester) Before(org.junit.Before)

Aggregations

DbClientContext (com.emc.storageos.db.client.impl.DbClientContext)3 DbClientImplUnitTester (com.emc.storageos.db.server.DbClientTest.DbClientImplUnitTester)3 Before (org.junit.Before)3 DrUtil (com.emc.storageos.coordinator.client.service.DrUtil)1 DbModelClientImpl (com.emc.storageos.db.client.impl.DbModelClientImpl)1