tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Edward Gruber <christianedwardgru...@gmail.com>
Subject Re: IoC registry survives between JUnit tests?
Date Thu, 04 Dec 2008 20:04:20 GMT
FYI, in general, you shouldn't be using the container in your tests,  
unless you're testing the wiring itself.  You should be creating the  
component/service under test, and constructing it with fakes.  This  
isn't absolute but there is a lot more effort/configuration/overhead  
if you want to use the container infrastructure in your unit test, and  
you start to have subtle interactions that might potentially make it  
more of an integration test.  You risk testing more than one thing at  
a time.

Christian

On 4-Dec-08, at 01:28 , Stephan Schwab wrote:

>
> Hi!
>
> I have several JUnit tests that instantiate
> org.apache.tapestry5.ioc.Registry via the RegistryBuilder before  
> tests run.
> Now I'm observing that services registered in one test are still  
> available
> in other tests although I did call registry.shutdown(). My test  
> runner does
> not fork a new JVM.
>
> Calling registry.shutdown() should cause everything to vanish. Is  
> there
> anything that causes one-registry-per-JVM?
>
> Stephan
>
>
>
> -----
> --
> http://www.caimito.net - Caimito One Team - Agile Collaboration and  
> Planning
> tool
> http://www.stephan-schwab.com - Personal blog
> http://code.google.com/p/tapestry-sesame - Authentication extension  
> for
> Tapestry 5
>
> -- 
> View this message in context: http://www.nabble.com/IoC-registry-survives-between-JUnit-tests--tp20828078p20828078.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Mime
View raw message