From d41a3fac53dcedd22769e5b176cd8eaf320041dc Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Tue, 13 May 2014 22:23:22 +0200 Subject: [PATCH] using db pool (since websockets can work asynchronously) copying changes in build.xml from isochrone-web (how to use config files in testing) --- build.gradle | 16 ++++++++++++++++ src/main/resources/config.xml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2f7ca287..1599bb12 100644 --- a/build.gradle +++ b/build.gradle @@ -292,6 +292,21 @@ task javadocJar(type: Jar, dependsOn: javadoc) { classifier 'javadoc' } +task processResourcesTest << { + if (!isRelease) { + // we add a config-test.xml for SNAPSHOT releases (so that the cfg.tablePrefix is defined) + // otherwise testing and stable version would collide on testsystem + // and testing in jenkins would search for geoserver/postgis on jenkins-server + // (since localhost is default value in config-files -> needed for development) + copy { + from('src/test/resources') { + include '*-test.xml' + } + into "${project.buildDir}/resources/main" + } + } +} + task sourcesJar(type: Jar, dependsOn: classes) { description = 'Builds a jar file including sources' from sourceSets.main.allSource @@ -357,5 +372,6 @@ task release tasks.cleanAfterDaily.dependsOn cleanNodeModules tasks.daily.finalizedBy cleanAfterDaily tasks.daily.mustRunAfter clean +tasks.processResources.finalizedBy processResourcesTest tasks.test.finalizedBy cleanTestResults tasks.vagrantUp.dependsOn vagrantPrepare diff --git a/src/main/resources/config.xml b/src/main/resources/config.xml index 76c113fa..2c636220 100644 --- a/src/main/resources/config.xml +++ b/src/main/resources/config.xml @@ -3,7 +3,7 @@ <properties> <!-- Global database settings --> <entry key="db.maxConnections">50</entry> - <entry key="db.pooling">false</entry> + <entry key="db.pooling">true</entry> <!-- Postgres database --> <entry key="org.postgresql.servername">localhost</entry> -- GitLab