Skip to content
Permalink
Browse files
Merge pull request #23 from Izakey/develop
Optimize demo-server to run services in less time
  • Loading branch information
Izakey committed Dec 26, 2018
2 parents 8a55eb2 + 9323a02 commit e8cf166e9ed8ee02411176b852cc41f4c1a73011
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
@@ -50,7 +50,7 @@ ext.versions = [
fineractcndeposit : '0.1.0-BUILD-SNAPSHOT',
fineractcnteller : '0.1.0-BUILD-SNAPSHOT',
fineractcnreporting : '0.1.0-BUILD-SNAPSHOT',
kuelapcheques : '0.1.0-BUILD-SNAPSHOT',
fineractcncheques : '0.1.0-BUILD-SNAPSHOT',
fineractcnpayroll : '0.1.0-BUILD-SNAPSHOT',
fineractcngroup : '0.1.0-BUILD-SNAPSHOT',
fineractcnnotification : '0.1.0-BUILD-SNAPSHOT',
@@ -108,7 +108,7 @@ dependencies {
[group: 'org.apache.fineract.cn.deposit-account-management', name: 'api', version: versions.fineractcndeposit],
[group: 'org.apache.fineract.cn.teller', name: 'api', version: versions.fineractcnteller],
[group: 'org.apache.fineract.cn.reporting', name: 'api', version: versions.fineractcnreporting],
[group: 'org.apache.fineract.cn.cheques', name: 'api', version: versions.kuelapcheques],
[group: 'org.apache.fineract.cn.cheques', name: 'api', version: versions.fineractcncheques],
[group: 'org.apache.fineract.cn.payroll', name: 'api', version: versions.fineractcnpayroll],
[group: 'org.apache.fineract.cn.group', name: 'api', version: versions.fineractcngroup],
[group: 'org.apache.fineract.cn.notification', name: 'api', version: versions.fineractcnnotification],
@@ -129,7 +129,6 @@ public class ServiceRunner {
private static Microservice<GroupManager> groupManager;
private static Microservice<NotificationManager> notificationManager;


private static DB embeddedMariaDb;

private static final String CUSTOM_PROP_PREFIX = "custom.";
@@ -271,11 +270,11 @@ public void tearDown() throws Exception {
ServiceRunner.reportManager.kill();
ServiceRunner.tellerManager.kill();
ServiceRunner.depositAccountManager.kill();
ServiceRunner.rhythmManager.kill();
ServiceRunner.portfolioManager.kill();
ServiceRunner.ledgerManager.kill();
ServiceRunner.customerManager.kill();
ServiceRunner.organizationManager.kill();
ServiceRunner.rhythmManager.kill();
ServiceRunner.identityManager.kill();

if (!isPersistent) {
@@ -334,8 +333,6 @@ private void startService(ExtraProperties properties, Microservice microservice)
logger.info("Service '{}' started with debug port {}.", microservice.name(), microservice.debuggingPort());
}
microservice.setApiFactory(this.apiFactory);

TimeUnit.SECONDS.sleep(20); //Give it some extra time before the next service...
}

private void migrateServices() {
@@ -351,11 +348,6 @@ private void migrateServices() {
ServiceRunner.provisionerService.api().assignIdentityManager(tenant.getIdentifier(), assignedApplication);
} else {
ServiceRunner.provisionerService.api().assignApplications(tenant.getIdentifier(), Collections.singletonList(assignedApplication));
try {
Thread.sleep(5000L);
} catch (InterruptedException e) {
//do nothing
}
}
});
});

0 comments on commit e8cf166

Please sign in to comment.