@BeforeClass public static void setUp(){ MongoDataSource ds = new MongoDataSource(getConnectionString()); metaLoader = MetadataDataLoader.getInstance(ds); metaLoader.loadTestDataFromResource(); }
public static void main(String[] args) { MongoDataSource ds = new MongoDataSource("localhost"); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); TestDataLoader.getDataLoader(ds, RAPTOR).cleanUp(); long temp = System.currentTimeMillis(); List<BsonEntity> resultList = RaptorEntityGenerator.generateRaptorTopology(COSEnum.QA, "srp-app" + temp, 3); TestDataLoader raptorLoader = TestDataLoader.getDataLoader(new MongoDataSource("localhost:27017"), RAPTOR); raptorLoader.load(resultList, DBCollectionPolicy.SplitByMetadata); System.out.println("abc"); }
public static void main(String[] args) { MongoDataSource ds = new MongoDataSource("localhost"); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); TestDataLoader.getDataLoader(ds, RAPTOR).cleanUp(); long temp = System.currentTimeMillis(); List<BsonEntity> resultList = RaptorEntityGenerator.generateRaptorTopology(COSEnum.QA, "srp-app" + temp, 3); TestDataLoader raptorLoader = TestDataLoader.getDataLoader(new MongoDataSource("localhost:27017"), RAPTOR); raptorLoader.load(resultList, DBCollectionPolicy.SplitByMetadata); System.out.println("abc"); }
@BeforeClass public static void createRepoService() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); repositoryService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer"); }
public static void main(String[] args) { MongoDataSource ds = new MongoDataSource("localhost"); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); TestDataLoader.getDataLoader(ds, RAPTOR).cleanUp(); long temp = System.currentTimeMillis(); TestDataLoader raptorLoader = TestDataLoader.getDataLoader(new MongoDataSource("localhost:27017"), RAPTOR); generateRaptorTopology(raptorLoader, COSEnum.QA, "srp-app" + temp, 3); }
@BeforeClass public static void setup() { MetadataDataLoader loader = MetadataDataLoader.getInstance(getDataSource()); loader.loadTestDataFromResource(); repositoryService = RepositoryServiceFactory.createRepositoryService(getDataSource(), "localCMSServer"); repo = repositoryService.getRepository(RAPTOR_PAAS); }
@BeforeClass public static void setup() { MetadataDataLoader loader = MetadataDataLoader.getInstance(getDataSource()); loader.loadTestDataFromResource(); repo = RepositoryServiceFactory.createRepositoryService(getDataSource(), "localCMSServer").getRepository( RAPTOR_PAAS); }
@BeforeClass public static void createRepoService() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); repositoryService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer"); repo = repositoryService.createRepository(new Repository(repoName)); }
@BeforeClass public static void setup() { MetadataDataLoader loader = MetadataDataLoader.getInstance(getDataSource()); loader.loadTestDataFromResource(); repo = RepositoryServiceFactory.createRepositoryService(getDataSource(), "localCMSServer").getRepository( RAPTOR_PAAS); appMeta = repo.getMetadataService().getMetaClass(APPLICATION_SERVICE); }
@BeforeClass public static void setUp(){ List<PersistenceService.Registration> implementations = RegistrationUtils.getTestDalImplemantation(dataSource); config = new CMSDBConfig(dataSource); MetadataDataLoader metaLoader = MetadataDataLoader.getInstance(dataSource); metaLoader.loadTestDataFromResource(); repoService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); RuntimeDataLoader dataLoader = RuntimeDataLoader.getDataLoader(dataSource, repoService, RAPTOR_REPO); dataLoader.load(RAPTOR_TEST_DATA); branchService = ServiceFactory.getBranchService(dataSource, implementations); entityService = ServiceFactory.getEntityService(dataSource, repoService, implementations); }
@BeforeClass public static void setupData() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); raptorMetaService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer") .getRepository(RAPTOR_REPO).getMetadataService(); serviceInstanceMetadata = raptorMetaService.getMetaClass("ServiceInstance"); appServiceMetadata = raptorMetaService.getMetaClass("ApplicationService"); environmentMeta = raptorMetaService.getMetaClass("Environment"); }
@BeforeClass public static void setupData() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); raptorMetaService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer") .getRepository(RAPTOR_REPO).getMetadataService(); serviceInstanceMetadata = raptorMetaService.getMetaClass("ServiceInstance"); appServiceMetadata = raptorMetaService.getMetaClass("ApplicationService"); environmentMeta = raptorMetaService.getMetaClass("Environment"); }
@BeforeClass public static void setupData() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); raptorMetaService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer") .getRepository(RAPTOR_REPO).getMetadataService(); serviceInstanceMetadata = raptorMetaService.getMetaClass("ServiceInstance"); appServiceMetadata = raptorMetaService.getMetaClass("ApplicationService"); environmentMeta = raptorMetaService.getMetaClass("Environment"); }
@BeforeClass public static void setupData() { MongoDataSource ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); raptorMetaService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer") .getRepository(RAPTOR_REPO).getMetadataService(); appServiceMetadata = raptorMetaService.getMetaClass("ApplicationService"); serviceInstanceMetadata = raptorMetaService.getMetaClass("ServiceInstance"); computeMetadata = raptorMetaService.getMetaClass("Compute"); }
@BeforeClass public static void createRepoService() { ds = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(ds).loadTestDataFromResource(); repositoryService = RepositoryServiceFactory.createRepositoryService(ds, "localCMSServer"); repo = repositoryService.createRepository(new Repository(repoName)); metaContext = new MetadataContext(); metaContext.setSourceIp("127.0.0.1"); metaContext.setSubject("unitTestUser"); Assert.assertEquals(repo, repo.getMetadataService().getRepository()); }
@BeforeClass public static void setUp(){ String connectionString = CMSMongoTest.getConnectionString(); MongoDataSource dataSource = new MongoDataSource(connectionString); config = new CMSDBConfig(dataSource); metaLoader = MetadataDataLoader.getInstance(dataSource); metaLoader.loadTestDataFromResource(); repoService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); RuntimeDataLoader runtimeLoader = RuntimeDataLoader.getDataLoader(dataSource, repoService, RAPTOR_REPO); runtimeLoader.load(RAPTOR_TEST_DATA); metaService = repoService.getRepository(RAPTOR_REPO).getMetadataService(); List<PersistenceService.Registration> implementations = RegistrationUtils.getTestDalImplemantation(dataSource); historyService = ServiceFactory.getHistoryService(config, dataSource, implementations); }
@BeforeClass public static void setUp(){ String connectionString = CMSMongoTest.getConnectionString(); MongoDataSource dataSource = new MongoDataSource(connectionString); metaLoader = MetadataDataLoader.getInstance(dataSource); metaLoader.loadTestDataFromResource(); repoService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); raptorMetaService = repoService.getRepository(RAPTOR_REPO).getMetadataService(); stratusMetaService = repoService.getRepository(STRATUS_REPO).getMetadataService(); persistenceService = new NewPersistenceServiceImpl(dataSource); raptorContext = new PersistenceContext(raptorMetaService, DBCollectionPolicy.SplitByMetadata, ConsistentPolicy.safePolicy(), BRANCH_TEST); StratusEntityGenerator.loadStratusTopology(DBCollectionPolicy.SplitByMetadata); }
@BeforeClass public static void createRepoService() { dataSource = new MongoDataSource(getConnectionString()); MetadataDataLoader.getInstance(dataSource).loadTestDataFromResource(); repositoryService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); repo = repositoryService.createRepository(new Repository(repoName)); metaService = repo.getMetadataService(); sequence = new MongoSequence(dataSource.getMongoInstance(), CMSConsts.SYS_DB, CMSConsts.SEQUENCE_COLL, CMSConsts.NEXT_FIELD_NAME_SEQ); Assert.assertEquals(repo, repo.getMetadataService().getRepository()); raptorMetaService = repositoryService.getRepository(RAPTOR_PAAS).getMetadataService(); }
@BeforeClass public static void setUp(){ String connectionString = CMSMongoTest.getConnectionString(); MongoDataSource dataSource = new MongoDataSource(connectionString); metaLoader = MetadataDataLoader.getInstance(dataSource); metaLoader.loadTestDataFromResource(); repoService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); raptorMetaService = repoService.getRepository(RAPTOR_REPO).getMetadataService(); stratusMetaService = repoService.getRepository(STRATUS_REPO).getMetadataService(); persistenceService = new PersistenceServiceImpl(dataSource); raptorContext = new PersistenceContext(raptorMetaService, DBCollectionPolicy.SplitByMetadata, ConsistentPolicy.safePolicy(), BRANCH_TEST, TestUtils.getTestDalImplemantation(dataSource)); StratusEntityGenerator.loadStratusTopology(DBCollectionPolicy.SplitByMetadata); }
@BeforeClass public static void setUp() { String connectionString = CMSMongoTest.getConnectionString(); MongoDataSource dataSource = new MongoDataSource(connectionString); metaLoader = MetadataDataLoader.getInstance(dataSource); metaLoader.loadTestDataFromResource(); repoService = RepositoryServiceFactory.createRepositoryService(dataSource, "localCMSServer"); raptorMetaService = repoService.getRepository(RAPTOR_REPO).getMetadataService(); deployMetaService = repoService.getRepository(SOFTWARE_DEPLOYMENT).getMetadataService(); persistenceService = new NewPersistenceServiceImpl(dataSource); raptorContext = new PersistenceContext(raptorMetaService, DBCollectionPolicy.SplitByMetadata, ConsistentPolicy.safePolicy(), BRANCH_TEST); deployContext = new PersistenceContext(deployMetaService, DBCollectionPolicy.SplitByMetadata, ConsistentPolicy.safePolicy(), BRANCH_TEST); }