Project

General

Profile

« Previous | Next » 

Revision 28b2c27a

Added by Andreas Kohlbecker over 6 years ago

partially fixing broken test suite:

  • using in mem h2 db for all tests
  • ignoring all broken presenter tests
  • separating out test applicationContext for pure service tests
  • reducing test data sets

View differences:

src/test/resources/unitils.properties
27 27
# (recommended) or the local filesystem.
28 28
#
29 29
unitils.configuration.localFileName=unitils-cdmlib-local.properties
30
#
31
updateDataBaseSchema.enabled=true
32
#
33
dataSetStructureGenerator.xsd.dirName=src/test/resources/eu/etaxonomy/cdm/database/schema
34
#
35
# Fully qualified name of the implementation of org.unitils.dbmaintainer.maintainer.script.ScriptSource that is used.
36
# The default value is 'org.unitils.dbmaintainer.maintainer.script.FileScriptSource', which will retrieve the scripts
37
# from the local file system.
38
org.unitils.dbmaintainer.script.ScriptSource.implClassName=org.unitils.dbmaintainer.script.impl.ResourceScriptSource
39

  
40
dbMaintainer.script.locations=dbscripts
41
#dbMaintainer.script.locations=src/test/resources/dbscripts  - requires ScriptSource.implClassName=...DefaultScriptSource
30 42

  
43
dbMaintainer.dbVersionSource.autoCreateVersionTable=true
44

  
45
dbMaintainer.autoCreateExecutedScriptsTable=true
31 46
# H2 #
47
#
32 48
database.driverClassName=org.h2.Driver
33
database.url=jdbc:h2:file:./target/test-classes/h2/cdmTest;MVCC=TRUE;IGNORECASE=TRUE;ALIAS_COLUMN_NAME=TRUE;AUTO_SERVER=TRUE;DATABASE_TO_UPPER=false;
49
database.url=jdbc:h2:mem:cdm
50
#database.url=jdbc:h2:file:~/.h2/cdm
34 51
database.dialect=h2
52
dbMaintainer.script.fileExtensions=h2.sql
35 53
database.userName=sa
36 54
database.password=
37 55
database.schemaNames=PUBLIC
38 56
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.h2=org.dbunit.ext.h2.H2DataTypeFactory
39
org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.cdm.database.H2DbSupport
57
#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName=org.dbunit.ext.h2.H2DataTypeFactory
58
#maybe we can replace this by org.unitils.core.dbsupport.H2DbSupport
59
org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.cdm.database.H2DbSupport  
40 60
database.storedIndentifierCase.h2=auto
61
database.identifierQuoteString.h2=auto
62

  
63

  
64
#### Transaction mode ###
65
#
66
# If set to commit or rollback, each test is run in a transaction,
67
# which is committed or rolled back after the test is finished.
68
# Since we have many tests with incomplete data these tests would be
69
# failing during commit so it is better use rollback as default
70
# and set commit for individual test where necessary
71
DatabaseModule.Transactional.value.default=rollback
72

  
73
### Hibernate ###
74
#
75
HibernateModule.configuration.implClassName=org.hibernate.cfg.Configuration
76

  
77
## Same as defined in hibernate.cfg.xml.
78
hibernate.connection.provider_class=org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl
79

  
80
#Created for hibernate 5 support, not yet available in standard unitils 
81
unitils.module.hibernate.className=org.unitils.orm.hibernate.Hibernate5Module
41 82

  
42 83
#Since Hibernate 5 (or earlier > 4.1.10) using the Proxy does not correctly release 
43 84
#the connections to the pool after transaction finishes.

Also available in: Unified diff