[opencms-dev] Unit Testing on 6.2 Beta

Ivan Codarin ivan.codarin at gmail.com
Mon Mar 6 15:36:01 CET 2006


Dears,
I'm trying to run unit tests on the 6.2 beta based on a Postgresql DBMS.
I'm running then by hand (without ant) from Eclipse 3.1.2.
I'm running the suite org.opencms.test.AllTests.

I've the first error on a query:



SELECT DISTINCT 
CMS_OFFLINE_STRUCTURE.STRUCTURE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_PATH,
CMS_OFFLINE_STRUCTURE.STRUCTURE_STATE,CMS_OFFLINE_STRUCTURE.DATE_RELEASED,CMS_OFFLINE_STRUCTURE.DATE_EXPIRED,CMS_OFFLINE_RESOURCES.RESOURCE_ID,
CMS_OFFLINE_RESOURCES.RESOURCE_TYPE,CMS_OFFLINE_RESOURCES.RESOURCE_FLAGS,CMS_OFFLINE_RESOURCES.RESOURCE_STATE,CMS_OFFLINE_RESOURCES.DATE_CREATED,
CMS_OFFLINE_RESOURCES.DATE_LASTMODIFIED,CMS_OFFLINE_RESOURCES.USER_CREATED,CMS_OFFLINE_RESOURCES.USER_LASTMODIFIED,CMS_OFFLINE_RESOURCES.PROJECT_LASTMODIFIED 
*AS* LOCKED_IN_PROJECT,
CMS_OFFLINE_RESOURCES.RESOURCE_SIZE,CMS_OFFLINE_RESOURCES.SIBLING_COUNT 
FROM CMS_OFFLINE_ACCESSCONTROL, CMS_OFFLINE_STRUCTURE,CMS_OFFLINE_RESOURCES
WHERE 
CMS_OFFLINE_ACCESSCONTROL.PRINCIPAL_ID='7c54fbe9-ad1a-11da-905d-4b60ca370499' 
AND CMS_OFFLINE_ACCESSCONTROL.RESOURCE_ID=CMS_OFFLINE_RESOURCES.RESOURCE_ID
AND CMS_OFFLINE_STRUCTURE.RESOURCE_ID=CMS_OFFLINE_RESOURCES.RESOURCE_ID 
ORDER BY CMS_OFFLINE_STRUCTURE.RESOURCE_PATH ASC


where for postgresql there are 2 errors:
1. the alias of the column 'LOCKED_IN_PROJECT' have to be declared with AS
2. the PRICINPAL_ID is something like a string so it should be enclosed 
in quotes.

But the real strange thing is that in this case Opencms is running over 
a GenericSQL, the queries are taken form

org.opencms.db.generic (query.properties)... and not from 
org.opencms.db.postgresql.

In all the previous steps the system was running correcly against my 
posqgresql database...

Is this a correct behavior, can exist shared queries between different dbms?

Thanks
I.





More information about the opencms-dev mailing list