diff --git a/dspace-api/pom.xml b/dspace-api/pom.xml
index 883fce5f90..7aa25cecb7 100644
--- a/dspace-api/pom.xml
+++ b/dspace-api/pom.xml
@@ -259,7 +259,16 @@
process-test-resources
+
+
+
+
+
+ ${dspace.dir}
+
diff --git a/dspace-api/src/test/resources/hibernate.cfg.xml b/dspace-api/src/test/data/dspaceFolder/config/hibernate.cfg.xml
similarity index 75%
rename from dspace-api/src/test/resources/hibernate.cfg.xml
rename to dspace-api/src/test/data/dspaceFolder/config/hibernate.cfg.xml
index a1fe02d0a0..34596283e9 100644
--- a/dspace-api/src/test/resources/hibernate.cfg.xml
+++ b/dspace-api/src/test/data/dspaceFolder/config/hibernate.cfg.xml
@@ -1,18 +1,30 @@
+
+
-
- org.hibernate.dialect.H2Dialect
-
-
- update
-
-
-
+ ${db.dialect}
+
+
+ update
org.hibernate.tool.hbm2ddl.SingleLineSqlCommandExtractor
false
org.hibernate.context.internal.ThreadLocalSessionContext
@@ -21,9 +33,9 @@
- 30
+ ${db.maxconnections}
- 50
+ ${db.statementpool.cache}
@@ -63,7 +75,6 @@
-
diff --git a/dspace-api/src/test/data/dspaceFolder/config/spring/api/core-test-hibernate.xml b/dspace-api/src/test/data/dspaceFolder/config/spring/api/core-test-hibernate.xml
deleted file mode 100644
index 20e79f1761..0000000000
--- a/dspace-api/src/test/data/dspaceFolder/config/spring/api/core-test-hibernate.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dspace/config/hibernate.cfg.xml b/dspace/config/hibernate.cfg.xml
index a5bcc513e9..9aaf7dacb4 100644
--- a/dspace/config/hibernate.cfg.xml
+++ b/dspace/config/hibernate.cfg.xml
@@ -71,7 +71,6 @@
-
diff --git a/pom.xml b/pom.xml
index dec65ad1fd..9c23c22ff0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,7 +89,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.17
+ 2.18.1
@@ -130,7 +130,7 @@
maven-assembly-plugin
- 2.4.1
+ 2.5.5
org.apache.maven.plugins
diff --git a/src/main/assembly/testEnvironment.xml b/src/main/assembly/testEnvironment.xml
index bcc77a2d58..8e8ac775f9 100644
--- a/src/main/assembly/testEnvironment.xml
+++ b/src/main/assembly/testEnvironment.xml
@@ -24,50 +24,69 @@
false
-
-
-
-
-
- dspace/bin/**
- dspace/config/**
- dspace/etc/**
- dspace/solr/**
-
-
-
- dspace/config/dspace.cfg
- dspace/config/log4j.properties
- dspace/config/modules/**
-
-
-
-
-
- dspace/config/modules/**
- dspace/config/dspace.cfg
- dspace/config/log4j.properties
-
- true
-
-
-
+
-
+ NOTE: This *might* overwrite/overlay default files copied below. -->
+
+ true
org.dspace:*
dspace
+
+
+ src/test/data/dspaceFolder/config
+ config
+ true
+
+
src/test/data/dspaceFolder
+
+ config/**
+
+
+
+
+
+
+
+
+ org.dspace:dspace
+
+
+ dspace
+
+
+
+
+
+ config/**
+
+ true
+
+
+
+ bin
+ bin
+
+
+ etc
+ etc
+
+
+ solr
+ solr
diff --git a/src/main/filters/testEnvironment.properties b/src/main/filters/testEnvironment.properties
index b970e6e003..bf7d29c466 100644
--- a/src/main/filters/testEnvironment.properties
+++ b/src/main/filters/testEnvironment.properties
@@ -1,18 +1,7 @@
# DSpace build.properties
-# This file should be customised to suit your build environment.
-# Note that not all configuration is handled here, only the most common
-# properties that tend to differ between build environments.
-# For adjusting global settings or more complex settings, edit the relevant config file.
-#
-# IMPORTANT: Do not remove or comment out settings in build.properties
-# When you edit the "build.properties" file (or a custom *.properties file),
-# take care not to remove or comment out any settings. Doing so, may cause
-# your final "dspace.cfg" file to be misconfigured with regards to that
-# particular setting. Instead, if you wish to remove/disable a particular
-# setting, just clear out its value. For example, if you don't want to be
-# notified of new user registrations, ensure the "mail.registration.notify"
-# setting has no value, e.g. "mail.registration.notify="
#
+# This file is a custom version of "build.properties" which is used
+# specifically for Unit Testing.
##########################
# SERVER CONFIGURATION #
@@ -53,33 +42,24 @@ default.language = en_US
##########################
# DATABASE CONFIGURATION #
##########################
-# For Unit Testing we use H2 running in "Oracle mode"
-db.driver = org.h2.Driver
-# Use a 10 second database lock timeout to avoid occasional JDBC lock timeout errors
-db.url = jdbc:h2:mem:test;MODE=Oracle;LOCK_TIMEOUT=10000
-db.username = sa
-db.password = sa
-# Schema name - if your database contains multiple schemas, you can avoid problems with
-# retrieving the definitions of duplicate object names by specifying
-# the schema name here that is used for DSpace by uncommenting the following entry
+# For Unit Testing we use the H2 (in memory) database
+db.driver = org.h2.Driver
+db.dialect=org.hibernate.dialect.H2Dialect
+# Use H2 running in "Oracle mode"
+# Use a 10 second database lock timeout to avoid occasional JDBC lock timeout errors
+db.url = jdbc:h2:mem:test;LOCK_TIMEOUT=10000;MVCC=true
+#db.url = jdbc:h2:mem:test;MODE=Oracle;LOCK_TIMEOUT=10000
+db.username = sa
+db.password =
+# H2 doesn't use schemas
db.schema =
# Maximum number of DB connections in pool
db.maxconnections = 30
-# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
-db.maxwait = 5000
-
-# Maximum number of idle connections in pool (-1 = unlimited)
-db.maxidle = -1
-
-# Determine if prepared statement should be cached. (default is true)
-db.statementpool = true
-
-# Specify a name for the connection pool (useful if you have multiple applications sharing Tomcat's dbcp)
-# If not specified, defaults to 'dspacepool'
-db.poolname = dspacepool
+# Determine the number of statements that can be cached (set to 0 to disable caching)
+db.statementpool.cache = 50
#######################
# EMAIL CONFIGURATION #