Project

General

Profile

« Previous | Next » 

Revision 034d3d7a

Added by Cherian Mathew over 8 years ago

testing fixes :

  • removed unnecessary config files
  • moved h2 test db to test resources folder
  • cleaned up unitils properties file
  • reverted applicationContext to use persistentTermInitializer

View differences:

src/test/resources/unitils.properties
1 1
#
2
# NOTE: this is the unitils.properties file for the cdmlib-services module
3
# a separate unitils.properties exists for cdmlib-io and for cdmlib-persistence
2
# NOTE: this is the unitils.properties file for the cdmlib-persistence module
3
# a separate unitils.properties exists for cdmlib-io and for cdmlib-services
4 4
#
5 5
#
6 6
# the list of all properties is found in
......
24 24
# developer's own unit test schema. It is recommended to override the name of this file in the project specific properties
25 25
# file, to include the name of the project. The system will try to find this file in the classpath, the user home folder
26 26
# (recommended) or the local filesystem.
27
unitils.configuration.localFileName=unitils-cdmlib-local.properties
28
#
29
updateDataBaseSchema.enabled=true
30
#
31
dataSetStructureGenerator.xsd.dirName=src/test/resources/eu/etaxonomy/cdm/vaadin/
32
#
33
dbMaintainer.script.locations=src/test/resources/dbscripts
34
dbMaintainer.dbVersionSource.autoCreateVersionTable=true
35
dbMaintainer.autoCreateExecutedScriptsTable=true
36

  
37

  
38
#
39
# default database configurations for HSQL, H2 and MYSQL:
40
#
41

  
42
# HSQL #
43 27
#
44
#   NOTE: hsqldb v. <1.9 has a bug (http://sourceforge.net/tracker/?func=detail&atid=378131&aid=1407528&group_id=23316)
45
#         due to which it is not possible to use batch updates, so we need to disable hibernate batching when using
46
#         hsqldb in the app context:
47
#
48
#database.driverClassName=org.hsqldb.jdbcDriver
49
#database.url=jdbc:hsqldb:mem:cdm
50
##database.url=jdbc:hsqldb:file:/home/andreas/.hsqldb/cdm;hsqldb.default_table_type=cached
51
#database.dialect=hsqldb
52
#dbMaintainer.script.fileExtensions=hsqldb.ddl
53
#database.userName=sa
54
#database.password=
55
#database.schemaNames=PUBLIC
56
#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.hsqldb=org.dbunit.ext.hsqldb.HsqldbDataTypeFactory
28
unitils.configuration.localFileName=unitils-cdmlib-local.properties
57 29

  
58 30
# H2 #
59 31
#
60
#database.driverClassName=com.p6spy.engine.spy.P6SpyDriver
61
#database.url=jdbc:p6spy:h2:mem:cdm;MVCC=TRUE;IGNORECASE=TRUE;ALIAS_COLUMN_NAME=TRUE;DATABASE_TO_UPPER=false;
62
database.url=jdbc:p6spy:h2:file:h2/cdmTest;MVCC=TRUE;IGNORECASE=TRUE;ALIAS_COLUMN_NAME=TRUE;AUTO_SERVER=TRUE;DATABASE_TO_UPPER=false;
63 32
database.driverClassName=org.h2.Driver
64
#database.url=jdbc:h2:mem:cdm;MVCC=TRUE;IGNORECASE=TRUE
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;
34
#database.url=jdbc:p6spy:h2:file:./target/test-classes/h2/cdmTest;MVCC=TRUE;IGNORECASE=TRUE;ALIAS_COLUMN_NAME=TRUE;AUTO_SERVER=TRUE;DATABASE_TO_UPPER=false;
65 35
database.dialect=h2
66
dbMaintainer.script.fileExtensions=h2.sql
67 36
database.userName=sa
68 37
database.password=
69 38
database.schemaNames=PUBLIC
70 39
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.h2=org.dbunit.ext.h2.H2DataTypeFactory
71
org.dbunit.database.IMetadataHandler.implClassName=org.dbunit.database.DefaultMetadataHandler
72
#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName=org.dbunit.ext.h2.H2DataTypeFactory
73
#org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.cdm.database.H2DbSupport
74
org.unitils.core.dbsupport.DbSupport.implClassName.h2=org.unitils.core.dbsupport.H2DbSupport
40
org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.cdm.database.H2DbSupport
75 41
database.storedIndentifierCase.h2=auto
76 42
database.identifierQuoteString.h2=auto
77 43

  
78
#
79
# MySQL #
80
# cannot be used
81
# 1. you need another ddl or sql file to generate the schema
82
# 2. our DataSet xml files and the dataset.dtd contain upper-case table names like
83
#    'TERMVOCABULARY_REPRESENTATION_AUD'  but hibernate expects CamelCase with mysql !!!!
84
#    maybe we can workaround this by implementing a custom EJB3NamingStrategy like
85
#    UppercaseTableNamingStrategy it must be set in the persitence.xml which returns table names
86
#    always in uppercase, but this again causes problems with the @Tabel annotations which must
87
#    exactly match the table names in the database. This means in order to use mysql for tests we would
88
#    have to change the table names in all of our DataSet files.
89
#
90
#database.driverClassName=com.mysql.jdbc.Driver
91
#database.url=jdbc:mysql://127.0.0.1:3306/test
92
#database.userName=edit
93
#database.password=wp5
94
#database.dialect=mysql
95
#database.schemaNames=test
96
#dbMaintainer.script.fileExtensions=mysql.sql
97
#org.dbmaintain.dbsupport.DbSupport.implClassName.mysql=org.dbmaintain.dbsupport.impl.MySqlDbSupport
98
#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.mysqldb=org.dbunit.ext.mysql.MySqlDataTypeFactory
99 44

  
100 45

  
101 46
#### Transaction mode ###
......
122 67
### Hibernate ###
123 68
#
124 69
HibernateModule.configuration.implClassName=org.hibernate.cfg.Configuration
70

  
71

  
72

  
73

  
74

  

Also available in: Unified diff