// @BeforeClass
// HACK - Fixable after this is fixed: https://issues.jboss.org/browse/ARQ-540
@Test @InSequence(-1)
public void startServers() throws Exception {
ModuleItem pkgA = rulesRepository.createModule("applyChangeSetTwice",
"this is package applyChangeSetTwice");
AssetItem ruleA1 = pkgA.addAsset("ruleA1", "", null, AssetFormats.DRL);
ruleA1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
ruleA1.checkin("version 1");
AssetItem ruleA2 = pkgA.addAsset("ruleA2", "", null, AssetFormats.DRL);
ruleA2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
ruleA2.checkin("version 1");
repositoryPackageService.createModuleSnapshot(pkgA.getName(), "snapshotA1", false, "",false,"","","",false,"","",false,"");
ModuleItem pkgB = rulesRepository.createModule("scanForChangeInRepository",
"this is package scanForChangeInRepository");
AssetItem ruleB1 = pkgB.addAsset("ruleB1", "", null, AssetFormats.DRL);
ruleB1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
ruleB1.checkin("version 1");
AssetItem ruleB2 = pkgB.addAsset("ruleB2", "", null, AssetFormats.DRL);
ruleB2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
ruleB2.checkin("version 1");
repositoryPackageService.createModuleSnapshot(pkgB.getName(), "snapshotB1", false, "",false,"","","",false,"","",false,"");
ModuleItem pkgC = rulesRepository.createModule("downloadPackageWithHttpClientImpl",
"this is package scanForChangeInRepository");
AssetItem ruleC1 = pkgC.addAsset("ruleC1", "", null, AssetFormats.DRL);
ruleC1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
ruleC1.checkin("version 1");
repositoryPackageService.createModuleSnapshot(pkgC.getName(), "snapshotC1", false, "",false,"","","",false,"","",false,"");
repositoryPackageService.rebuildPackages();
repositoryPackageService.rebuildSnapshots();
}