-----Original Message----- From: Ludovic Dubost [mailto:[email protected]] Sent: mardi 31 mai 2005 18:44 To: [email protected] Subject: Re: [xwiki-dev] Pb in unit tests with my refactoring...
Some tests load the XWiki object and in this case the xwiki.cfg file will have an impact on the hibernate config.
I'm currently trying to fix the ClassesTest.java tests. They seem to use the XWikiHibernateStore class but the error that I get seems to indicate it's using the value in xwiki.store.hibernate.path property: org.hibernate.HibernateException: could not find file: hibernate-test.cfg.xml at org.hibernate.cfg.Configuration.configure(Configuration.java:1199) at com.xpn.xwiki.store.XWikiHibernateStore.initHibernate(XWikiHibernateStore.ja va:115) at com.xpn.xwiki.store.XWikiHibernateStore.checkHibernate(XWikiHibernateStore.j ava:250) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.jav a:466) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.jav a:549) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:77) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:557) at com.xpn.xwiki.XWiki.getUserClass(XWiki.java:1316) at com.xpn.xwiki.test.ClassesTest.testDBListDisplayers(ClassesTest.java:204)
Some tests directly work with XWikiHibernateStore class.. In this case the param is hardcoded in the java..
Try xwiki.store.hibernate.path=/hibernate-test.cfg.xml
I don't see how this could work. You need to use getClss().getResource() to make this work... -Vincent _____________________________________________________________________________ D�couvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vid�os ! Cr�ez votre Yahoo! Mail sur http://fr.mail.yahoo.com