Alexander Klimetschek wrote: > Ok, I have seen the change. That's ok for sling i18n. > > I wrote the slingtesthelper before the i18n tests, with the > requirement of a full resolver at hand. > Yes, and I really appreciate your effort.
>> I would say go with simple unit tests where you can work with mock >> objects. If you need a full blown resource resolver, just use pax exam, >> fire up an osgi framework and start the jcr bundle. It's really easy to >> do this. > > How fast is it? Can you provide an example? It's not fast, but it's fast enough for a unit test. Apache Felix junit4osgi is an alternative that we could use as well, it's a little bit faster. I don't have an example :) I tried to write some tests some weeks ago and got there very quickly. I think Felix is using this for testing config admin and scr. > > The nice thing about my approach is that I can selectively create the > objects I need. A pax based solution should allow the same. Having to > activate every component, even those that aren't tested at all, can > slow down things. Yes, but honestly, is this important for a test? Does it matter if the test takes 2 seconds or 15 seconds? Ok there is a break even point of course. > However, as the i18n module no longer requires slingtest, and nobody > likes this, I think a veto on SLING-1166 is required and you can drop > it. Oh no, it's not that nobody likes it, I like the idea - but not how it is done. So you mean we should revert the whole patch and even remove the adapter support? > My aim with this was to make it easier to write unit tests this > way. My fear is that requiring an additional framework (pax) for unit > tests (dependencies ++) increases the burden for writing unit tests at > all. Yes, it would be great if writing junit tests becomes easier. And again I appreciate your effort. However, I doubt that even if we have this, we get more junit tests. Its more like this old meme where people think that it requires a great documentation app in order to motivate people to write docs. As always there is some truth in it, but even with something like this in place, the situation does not alter from one day to another. Regards Carsten -- Carsten Ziegeler cziege...@apache.org