Skip to content
Permalink
Browse files
Migrate reporting service from MariaDB to PostgreSQL
  • Loading branch information
Izakey committed May 9, 2019
1 parent 1e50d2d commit a06d1bf348137576f97e37348b17875518ac4772
Showing 6 changed files with 21 additions and 15 deletions.
@@ -1,5 +1,5 @@
Apache Fineract CN Reporting
Copyright [2017-2018] The Apache Software Foundation
Copyright [2017-2019] The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -21,7 +21,7 @@
import org.apache.fineract.cn.test.env.TestEnvironment;
import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
import org.apache.fineract.cn.test.fixture.postgresql.PostgreSQLInitializer;
import org.junit.ClassRule;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
@@ -32,13 +32,13 @@ public class SuiteTestEnvironment {

public final static TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
private final static CassandraInitializer cassandraInitializer = new CassandraInitializer();
private final static MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
private final static PostgreSQLInitializer postgreSQLInitializer = new PostgreSQLInitializer();
final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, postgreSQLInitializer);

@ClassRule
public static TestRule orderClassRules = RuleChain
.outerRule(testEnvironment)
.around(cassandraInitializer)
.around(mariaDBInitializer)
.around(postgreSQLInitializer)
.around(tenantDataStoreContext);
}
@@ -54,7 +54,7 @@ dependencies {
[group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
[group: 'org.apache.fineract.cn', name: 'async', version: versions.frameworkasync],
[group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
[group: 'org.apache.fineract.cn', name: 'mariadb', version: versions.frameworkmariadb],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: '0.1.0-BUILD-SNAPSHOT'],
[group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
[group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator],
[group: 'org.owasp.esapi', name: 'esapi', version: '2.1.0.1']
@@ -24,7 +24,7 @@
import org.apache.fineract.cn.lang.config.EnableApplicationName;
import org.apache.fineract.cn.lang.config.EnableServiceException;
import org.apache.fineract.cn.lang.config.EnableTenantContext;
import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
import org.apache.fineract.cn.postgresql.config.EnablePostgreSQL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -44,7 +44,7 @@
@EnableCommandProcessing
@EnableTenantContext
@EnableCassandra
@EnableMariaDB
@EnablePostgreSQL
@EnableAnubis
@EnableServiceException
@EnableJpaRepositories(basePackages = {
@@ -23,6 +23,11 @@ spring:
enabled: false
config:
enabled: false
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/playground
username: postgres
password: postgres

eureka:
client:
@@ -42,13 +47,13 @@ cassandra:
write: LOCAL_QUORUM
delete: LOCAL_QUORUM

mariadb:
driverClass: org.mariadb.jdbc.Driver
postgresql:
driverClass: org.postgresql.Driver
database: seshat
host: localhost
port: 3306
user: root
password: mysql
port: 5432
user: postgres
password: postgres

bonecp:
idleMaxAgeInMinutes: 240
@@ -23,7 +23,7 @@ ext.versions = [
frameworklang : '0.1.0-BUILD-SNAPSHOT',
frameworkasync : '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra : '0.1.0-BUILD-SNAPSHOT',
frameworkmariadb : '0.1.0-BUILD-SNAPSHOT',
frameworkpostgresql : '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest: '0.1.0-BUILD-SNAPSHOT',
frameworkanubis: '0.1.0-BUILD-SNAPSHOT',
@@ -60,7 +60,8 @@ ext['spring-data-releasetrain.version'] = 'Gosling-SR2A'

dependencies {
compile(
[group: 'com.google.code.findbugs', name: 'jsr305']
[group: 'com.google.code.findbugs', name: 'jsr305'],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: versions.frameworkpostgresql]
)

testCompile(

0 comments on commit a06d1bf

Please sign in to comment.