Hello.
I think these 6 tests is incorrect.
Example: testVersionedReadWrite()
In this test we store one document 2 times with different data, load 1st
version and get version list (versions var.) of documents.
I think versions.length should be 2, but in test:
assertTrue(1==versions.length);
I look why it is work in hibernate (in my XWikiJcrStore versions.length==2)
and found, what versioning updates in saveXWikiDoc run before setting
database : doc.setDatabase(context.getDatabase());
And versioning cache (XWikiContext.get/set DocumentArchive) storing at
key with default database 'xwiki', instead of 'xwikitest'
Because of it first saveXWikiDoc call storing in versioning cache by key
'xwiki:Main.WebHome', second - 'xwikitest:Main.WebHome'
Next, XWikiHibernateVersioningStore.loadXWikiDoc don't set database to
document. And XWikiHibernateVersioningStore.getXWikiDocVersions look at
wrong cache key 'xwiki:Main.WebHome' with only 1 document version.
If this is right, i offer:
XWikiHibernateStore.saveXWikiDoc:
move doc.setDatabase(context.getDatabase()); to begin
XWikiHibernateVersioningStore.loadXWikiDoc:
do doc.setDatabase(basedoc.getDatabase());
StoreTest.versionedReadWrite:
assertEquals(2, versions.length);
With these changes StoreTest passed.
I can commit this with you agree.
--
Artem Melentyev, UralSU, CS401.
We've updated the Mandriva Club to one of the latest XWiki release, and
I'm happy to report that the improvements are very impressive!!
The object storage performance is now excellent and opens up many
possibilities for large scale collaborative database editing on the Club.
To all XWiki developers: should you want a VIP account on the Club for
downloading the Mandriva Linux 2007 to be out in September, feel free to
drop me an email.
Mandriva Club: http://club.mandriva.com
Congratulations to XWiki dev team, and may the project keep making great
strides at rapid pace!
Stéphane
--
Stéphane Laurière
Email: slauriere(a)mandriva.com
Mandriva Research
http://www.mandriva.comhttp://nepomuk.semanticdesktop.orghttp://www.edos-project.org