You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Felix Roethenbacher <fr...@apache.org> on 2009/02/10 05:11:49 UTC

Re: [2.2] Unit tests (was svn commit: r742485)

Hi Andi

The reason why I deliberately left out the unit tests in
the beginning was a dependency on a generic abstract test case.
If migrated to Maven this code would have to be placed in a separate
module. Dependent modules would have to declare a dependency
on this module with scope 'test'.

Have you resolved the nested dependencies of the unit tests in the
various modules yet? Currently most unit test don't compile and
the ones which do are failing.

Cheers, Felix


andreas@apache.org wrote:
> Author: andreas
> Date: Mon Feb  9 13:22:37 2009
> New Revision: 742485
> 
> URL: http://svn.apache.org/viewvc?rev=742485&view=rev
> Log:
> Start migration of core tests.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:

[…]

>> I think you moved this to lenya-core-impl-tests
> 
> Actually I moved the abstract tests to the core-api module to avoid the 
> dependencies from the "peripherical" modules to the core-impl module. 

Sorry, that should read "to the core-impl tests". The runtime dependency 
to the core-impl module is obviously still necessary because of the core 
component implementations.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Andreas Hartmann <an...@apache.org>.
Hi Felix,

Felix Roethenbacher schrieb:
> Andreas Hartmann wrote:
>> Andreas Hartmann schrieb:
>>
>> […]
>>
>>>> Have you resolved the nested dependencies of the unit tests in the
>>>> various modules yet? Currently most unit test don't compile and
>>>> the ones which do are failing.
>>>
>>> The ones in SVN should compile now, but they are still failing. I'm 
>>> resolving exception after exception which occur due to missing bean 
>>> wiring, which is to be expected – but I guess this will improve as 
>>> soon as the basic components are correctly wired.
>>
>> The tests in SVN are now succeeding for me.
> 
> Not for me:
> 
> Missing:
> ----------
> 1) org.apache.lenya:lenya-core-impl:test-jar:tests:2.2.0-SNAPSHOT
> [...]
>   Path to dependency:
>         1) org.apache.lenya:lenya-core-workflow:jar:2.2.0-SNAPSHOT
>         2) org.apache.lenya:lenya-core-impl:test-jar:tests:2.2.0-SNAPSHOT

sorry, this dependency was obsolete. I forgot to remove it, now it 
should work.

> Maybe you have to remove the Lenya artifacts from your local Maven
> repository to see this.

Thanks for the hint – that way I also got the error.

> I think you moved this to lenya-core-impl-tests

Actually I moved the abstract tests to the core-api module to avoid the 
dependencies from the "peripherical" modules to the core-impl module. 
The core-impl-test module is isolated.

> but if I add
> this dependency I get a cyclic dependencies error. The problem is that
> the unit tests inherit from some abstract test classes which are
> in the core modules, hence the cyclic dependency. Probably we
> should simplify the test classes and get rid of these abstract
> test classes.

I guess it's OK to have the abstract test classes in the core-api 
module, since this one is needed by virtually all other modules. WDYT?

But of course I don't mind simplifying the tests; it would be nice if 
one doesn't have to extend a proprietary abstract test class.

Thanks for your help!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Felix Roethenbacher <fr...@apache.org>.
Andreas Hartmann wrote:
> Andreas Hartmann schrieb:
> 
> […]
> 
>>> Have you resolved the nested dependencies of the unit tests in the
>>> various modules yet? Currently most unit test don't compile and
>>> the ones which do are failing.
>>
>> The ones in SVN should compile now, but they are still failing. I'm 
>> resolving exception after exception which occur due to missing bean 
>> wiring, which is to be expected – but I guess this will improve as 
>> soon as the basic components are correctly wired.
> 
> The tests in SVN are now succeeding for me.

Not for me:

Missing:
----------
1) org.apache.lenya:lenya-core-impl:test-jar:tests:2.2.0-SNAPSHOT
[...]
   Path to dependency:
         1) org.apache.lenya:lenya-core-workflow:jar:2.2.0-SNAPSHOT
         2) org.apache.lenya:lenya-core-impl:test-jar:tests:2.2.0-SNAPSHOT

Maybe you have to remove the Lenya artifacts from your local Maven
repository to see this.

I think you moved this to lenya-core-impl-tests but if I add
this dependency I get a cyclic dependencies error. The problem is that
the unit tests inherit from some abstract test classes which are
in the core modules, hence the cyclic dependency. Probably we
should simplify the test classes and get rid of these abstract
test classes.

- Felix

> 
> I created a directory $LENYA_HOME/pubs containing the test publication. 
> To make the tests run you have to update the paths in 
> pubs/test/config/access-control/access-control.xml.
> 
> To avoid cyclic dependencies, I created a separate module for the core 
> impl tests. This way, the core impl tests can depend on various modules 
> which have runtime dependencies to the core impl (that is, to the 
> service declarations).
> 
> So, the basic read/write operations to the repository are working again. 
> From my PoV the next steps would be:
> 
> - migrate the remaining tests
> - make the webapp work again, incl. design of the directory structure etc.
> 
> Of course any help is greatly appreciated!
> 
> -- Andreas
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:

[…]

>> Have you resolved the nested dependencies of the unit tests in the
>> various modules yet? Currently most unit test don't compile and
>> the ones which do are failing.
> 
> The ones in SVN should compile now, but they are still failing. I'm 
> resolving exception after exception which occur due to missing bean 
> wiring, which is to be expected – but I guess this will improve as soon 
> as the basic components are correctly wired.

The tests in SVN are now succeeding for me.

I created a directory $LENYA_HOME/pubs containing the test publication. 
To make the tests run you have to update the paths in 
pubs/test/config/access-control/access-control.xml.

To avoid cyclic dependencies, I created a separate module for the core 
impl tests. This way, the core impl tests can depend on various modules 
which have runtime dependencies to the core impl (that is, to the 
service declarations).

So, the basic read/write operations to the repository are working again. 
 From my PoV the next steps would be:

- migrate the remaining tests
- make the webapp work again, incl. design of the directory structure etc.

Of course any help is greatly appreciated!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:

[…]

> The most serious problems are caused by the URI handling; I have 
> temporarily added the test publication as a resource in the core-impl 
> module, so that the tests can at least be run. I had to patch the user 
> management and the sourcerepository a bit to make them work with 
> resource:// URIs. I'll continue to make the tests work later this evening.

Obviously resource:// sources can't be modified, so only the read-only 
tests succeed. We should try to come up with a publication persistence 
concept (basically, where to store them) asap.

-- Andreas



-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [2.2] Unit tests (was svn commit: r742485)

Posted by Andreas Hartmann <an...@apache.org>.
Hi Felix,

Felix Roethenbacher schrieb:
> The reason why I deliberately left out the unit tests in
> the beginning was a dependency on a generic abstract test case.
> If migrated to Maven this code would have to be placed in a separate
> module. Dependent modules would have to declare a dependency
> on this module with scope 'test'.

for the moment, I have put the AbstractAccessControlTest and 
AbstractLenyaTestCase in the core-api module, which exports them as a 
test jar. But if I understand you correctly, this is not a recommended 
approach. Should we add a separate module for these classes?

> Have you resolved the nested dependencies of the unit tests in the
> various modules yet? Currently most unit test don't compile and
> the ones which do are failing.

The ones in SVN should compile now, but they are still failing. I'm 
resolving exception after exception which occur due to missing bean 
wiring, which is to be expected – but I guess this will improve as soon 
as the basic components are correctly wired.

The most serious problems are caused by the URI handling; I have 
temporarily added the test publication as a resource in the core-impl 
module, so that the tests can at least be run. I had to patch the user 
management and the sourcerepository a bit to make them work with 
resource:// URIs. I'll continue to make the tests work later this evening.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org