[ 
https://jira.codehaus.org/browse/SUREFIRE-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352061#comment-352061
 ] 

Tibor Digana edited comment on SUREFIRE-749 at 8/30/14 5:30 AM:
----------------------------------------------------------------

I have SSD disk with i7 and every IT starts in < 1 second.
It only makes sense to run parallel tests if every takes > x10seconds. In such 
case a forked process delay is < 10%.
I don't see any reason why all the libraries should be reloaded again n new CL 
because of running next test method.
The only reason i can see is shared static variables, if it is this case, it is 
the problem of s/w design of libraries you are testing.
Can you imaging how this feature would have to be customized in case it was 
released? Everybody wants to have different classes in parent CL, reused libs, 
newly reloaded libs,then somebody comes with OSGi requirements, etc.

For instance I need parallel exec on OpenEJB framework, but it is not possible 
because it is singleton. I cannot use parallel exec even if I developed in 
surefire, but I am fine with forked processes.
I would like to have EDT isolated in every test, but it's not possible because 
it's JRE and i know that reloading JRE takes again some time.


was (Author: tibor17):
I have SSD disk with i7 and every IT starts in < 1 second.
It only makes sense to run parallel tests if every takes > x10seconds. In such 
case a forked process delay is < 10%.
I don't see any reason why all the libraries should be reloaded again n new CL 
because of running next test method.
The only reason i can see is shared static variables, if is this case, is 
problem of s/w design of libraries you are testing.
Can you imaging how this feature would have to be customized in case it was 
release? Everybody wants to have different classes in parent CL, reused libs, 
newly reloaded libs,then somebody comes with OSGi requirements, etc.

For instance I need parallel exec on OpenEJB framework, but it is not possible 
because it is singleton. I cannot use parallel exec even if I developed in 
surefire, but I am fine with forked processes.
I would like to have EDT isolated in every test, but it's not possible because 
it's JRE and i know that reloading JRE takes again some time.

> Parallel methods should run in separate classloaders
> ----------------------------------------------------
>
>                 Key: SUREFIRE-749
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-749
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.8.1
>            Reporter: Gili
>
> When running in parallel-method or parallel-both mode, each @Test should run 
> in its own ClassLoader. I'm running into a lot of problems involving the use 
> of static variables in 3rd-party libraries. Here are two examples:
> 1. slf4j: http://bugzilla.slf4j.org/show_bug.cgi?id=176
> 2. guice: http://code.google.com/p/google-guice/issues/detail?id=635
> I believe running in isolated ClassLoaders would fix both problems and it 
> makes a lot of sense from a test isolation point of view so we should do it 
> anyway.
> I believe Surefire's forkMode is defined in terms of isolated JVMs instead of 
> ClassLoaders. Furthermore, it only seems to support per-Class isolation 
> instead of per-@Test isolation.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to