Skip to content

Commit

Permalink
Optimize demo-server to run services in less time
Browse files Browse the repository at this point in the history
  • Loading branch information
Izakey committed Dec 26, 2018
1 parent 8a55eb2 commit 9323a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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],
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand All @@ -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
}
}
});
});
Expand Down

0 comments on commit 9323a02

Please sign in to comment.