I would vote for having hsqldb the default for tests, as well as the
final release...
This would make a much simpler release..
I would also vote for embedding jetty which would allow for a fully
standalone XWiki.
Ludovic
Luis Arias a écrit :
Author: kaaloo
Date: 2005-05-23 22:21:16 +0200 (Mon, 23 May 2005)
New Revision: 565
Added:
xwiki/trunk/lib/hsqldb-1.7.3.jar
xwiki/trunk/test/hibernate-test-template.cfg.xml
xwiki/trunk/test/hsqldb_filters.properties
xwiki/trunk/test/mysql_filters.properties
Log:
Setup build system so that its possible to run tests in either hsqldb or mysql
as before. Mysql is the default. To run tests with hsqldb it is necessary
to define a property in your build.properties like
tests.filtersfile=test/hsqldb_filters.properties
The filter properties are applied to test/hibernate-test-template.cfg.xml in
the build file to generate an appropriate test/hibernate-test.cfg.xml file. It
turned out this was easier to implement than having seperate hibernate-test.cfg.xml
files for each type of database since I then would have had to look at how to have
a different xwiki.cfg file for each database since those files would have to be
mentioned there. And so the problem would have just gone up a level.
Added a version number to hsqldb.
Added encoding="ISO-8859-1" to javac ant tasks because of encoding problems in
ubuntu (UTF-8 by default).
Some files didn't get committed in previous attempt.
Added: xwiki/trunk/lib/hsqldb-1.7.3.jar
===================================================================
(Binary files differ)
Property changes on: xwiki/trunk/lib/hsqldb-1.7.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: xwiki/trunk/test/hibernate-test-template.cfg.xml
===================================================================
--- xwiki/trunk/test/hibernate-test-template.cfg.xml 2005-05-23 20:19:00 UTC (rev 564)
+++ xwiki/trunk/test/hibernate-test-template.cfg.xml 2005-05-23 20:21:16 UTC (rev 565)
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration
DTD//EN"
+
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+<session-factory>
+<property name="show_sql">true</property>
+<property name="use_outer_join">true</property>
+
+<property name="dbcp.defaultAutoCommit">false</property>
+<property name="dbcp.maxActive">50</property>
+<property name="dbcp.maxIdle">5</property>
+<property name="dbcp.maxWait">30000</property>
+<property name="dbcp.whenExhaustedAction">1</property>
+<property name="dbcp.ps.whenExhaustedAction">1</property>
+<property name="dbcp.ps.maxActive">20</property>
+<property name="dbcp.ps.maxWait">120000</property>
+<property name="dbcp.ps.maxIdle">20</property>
+
+<property name="connection.url">@connection.url@</property>
+<property
name="connection.username">@connection.username@</property>
+<property
name="connection.password">@connection.password@</property>
+<property
name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+<property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+<property name="connection.pool_size">50</property>
+<property name="statement_cache.size">50</property>
+<property name="dialect">@dialect@</property>
+<property
name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
+<!-- Mapping files -->
+<mapping resource="xwiki.hbm.xml"/>
+</session-factory>
+</hibernate-configuration>
Added: xwiki/trunk/test/hsqldb_filters.properties
===================================================================
--- xwiki/trunk/test/hsqldb_filters.properties 2005-05-23 20:19:00 UTC (rev 564)
+++ xwiki/trunk/test/hsqldb_filters.properties 2005-05-23 20:21:16 UTC (rev 565)
@@ -0,0 +1,5 @@
+connection.url=jdbc:hsqldb:mem:xwikitest
+connection.username=sa
+connection.password=
+connection.driver_class=org.hsqldb.jdbcDriver
+dialect=org.hibernate.dialect.HSQLDialect
\ No newline at end of file
Added: xwiki/trunk/test/mysql_filters.properties
===================================================================
--- xwiki/trunk/test/mysql_filters.properties 2005-05-23 20:19:00 UTC (rev 564)
+++ xwiki/trunk/test/mysql_filters.properties 2005-05-23 20:21:16 UTC (rev 565)
@@ -0,0 +1,5 @@
+connection.url=jdbc:mysql://localhost/xwikitest
+connection.username=xwikitest
+connection.password=xwikitest
+connection.driver_class=com.mysql.jdbc.Driver
+dialect=org.hibernate.dialect.MySQLDialect
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-commits(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-commits-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic