use of com.emc.storageos.db.client.impl.DbClientContext in project coprhd-controller by CoprHD.
the class DbIndexTest method createClient.
private DbClientTest.DbClientImplUnitTester createClient() {
DbClientTest.DbClientImplUnitTester dbClient = new DbClientTest.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);
return dbClient;
}
use of com.emc.storageos.db.client.impl.DbClientContext in project coprhd-controller by CoprHD.
the class DbsvcTestBase method getDbClientBase.
protected static InternalDbClient getDbClientBase(InternalDbClient dbClient) {
dbClient.setCoordinatorClient(_coordinator);
dbClient.setDbVersionInfo(sourceVersion);
dbClient.setBypassMigrationLock(true);
_encryptionProvider.setCoordinator(_coordinator);
dbClient.setEncryptionProvider(_encryptionProvider);
DbClientContext localCtx = new MockDbClientContext();
localCtx.setClusterName("Test");
localCtx.setKeyspaceName("Test");
dbClient.setLocalContext(localCtx);
dbClient.setDrUtil(new DrUtil(_coordinator));
VdcUtil.setDbClient(dbClient);
return dbClient;
}
use of com.emc.storageos.db.client.impl.DbClientContext 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);
}
use of com.emc.storageos.db.client.impl.DbClientContext in project coprhd-controller by CoprHD.
the class DBClientTestBase method createDbClient.
/**
* Create DbClient to embedded DB
*
* @return
*/
protected static DbClient createDbClient() {
ENCRYPTION_PROVIDER.setCoordinator(ModelTestSuite.getCoordinator());
DbClientContext localCtx = new DbClientContext();
localCtx.setClusterName("Test");
localCtx.setKeyspaceName("Test");
DbClientImpl dbClient = new DbClientImpl();
dbClient.setCoordinatorClient(ModelTestSuite.getCoordinator());
dbClient.setEncryptionProvider(ENCRYPTION_PROVIDER);
dbClient.setBypassMigrationLock(true);
dbClient.setDbVersionInfo(ModelTestSuite.getDbVersionInfo());
dbClient.setLocalContext(localCtx);
VdcUtil.setDbClient(dbClient);
dbClient.start();
return dbClient;
}
use of com.emc.storageos.db.client.impl.DbClientContext 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;
}
Aggregations