[OJB-developers] JUNIT failures & errors
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-06-02 14:21:59
|
Hi all, I just checked in some minor fixes that cure most of the problems I mentioned in my last mail. I set some log-messages in JdbcAccess from .error(...) to .debug(...). This avoids all the internal stacktrace within the PB Junit tests. This does not compromise stability as throwing of exceptions is not touched. I found a minor issue in SqlUpdateStatement: in appendSetClause(...) it uses appendColname from the baseclass SqlStatement. This method is used to generate column names from field descriptors. It uses FieldDescriptor.getFullColumnName() to build a column name. This will include Schema and table name in a column name (i.e. a column "NAME" would be fullqualified as "MySchema.MyTable.NAME"). This may work in most situations, but it does not work for Update statements in Hsqldb (AFAIK DB2 and InstantDB also don't support this). I refactored this code with the "template method" pattern, that allows subclasses to override the qualification behaviour. Could this fix be problematic for other databases? Or could there be any cases where full-qualified names are needed within Update Statements? Now we have the following JUnit results: PersistenceBroker: 0 Failures, 0 Errors, 0 Stacktraces SODA: 0 Failures, 0 Errors, 0 Stacktraces ODMG: 0 Failures, 1 Error (resulting in some stacktracing) The error is in test.ojb.odmg.OneToOneTest.testSave(). I hope to get this fixed soon. cheers, Thomas |