On Fri, May 16, 2008 at 1:47 PM, Vincent Massol
<vincent(a)massol.net>
wrote:
Hi Fabio,
I was looking at the new XMLRPC tests and I think there are some
unfinished stuff we need to clean up/align.
Right now there are 2 series of tests: ones in com.xpn package and
one
in org.xwiki package:
addTestCase(suite, AnonymousAccessTest.class);
addTestCase(suite, AttachmentsTest.class);
addTestCase(suite, CommentsTest.class);
addTestCase(suite, PagesTest.class);
addTestCase(suite, SpacesTest.class);
addTestCase(suite, org.xwiki.xmlrpc.AttachmentsTest.class);
addTestCase(suite, org.xwiki.xmlrpc.AuthenticationTest.class);
addTestCase(suite, org.xwiki.xmlrpc.CommentsTest.class);
addTestCase(suite, org.xwiki.xmlrpc.PagesTest.class);
addTestCase(suite, org.xwiki.xmlrpc.SpacesTest.class);
addTestCase(suite, org.xwiki.xmlrpc.XWikiClassesTest.class);
addTestCase(suite, org.xwiki.xmlrpc.XWikiObjectsTest.class);
addTestCase(suite, org.xwiki.xmlrpc.SearchTest.class);
We need to merge them (not sure why there are 2 locations). The
correct package is probably com.xpn since the org.xwiki one is
reserved for new components.
The tests under com.xpn are the old ones (written before 1.4
refactoring), the org.xwiki are the new ones.
I don't understand why the org.xwiki package should be reserved for
new components, can you explain it ?
I thought we had discussed and already agreed on this. I'm pretty sure
I sent an email and we had a discussion but I wasn't able to quickly
find the discussion thread again. Here are some arguments I remember:
* The current code is com.xpn and we can't change it easily to
org.xwiki since it would break all our users and all existing plugins,
etc. Thus we should absolutely continue using com.xpn for all existing
code modifications.
* OTOH new components are breaking backward compatibility anyway so
it's a good time to switch to the new org.xwiki scheme which we all
agreed is the one we want in the end.
* Using org.xwiki only for code written with the new architecture
clearly labels that code as "clean", i.e. following the new component
coding practices.
In the case at hand here, the xmlrpc code in core is using com.xpn and
there's no reason why its tests should use a different package name.
I'm personally not too sure about the code in the new modules (core-
xmlrpc-client and core-xmlrpc-model) but I didn't say anything since I
believe we could consider it as "clean" code. The reason I say I'm not
too sure is that I haven't reviewed the code and I don't know if it
should have components or not.
Hope it's more clear.
Thanks
-Vincent