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

Tibor Digana commented on SUREFIRE-1082:
----------------------------------------

@Bayley Gaillard 
Works on my side with 2.17 and future 2.18. (every next test parameter triggers 
a new Thread)
I think the framework with web-browsers is a blocker with synchronizations 
inside. Maybe it has own Perameterized runner.

Any objections closing this?

@Kristian
Let's track this issue for closing.

My test result and code:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running SomeTest
a 0 pool-1-thread-1
b 0 pool-1-thread-1
a 1 pool-1-thread-2
b 1 pool-1-thread-2
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in 
SomeTest

<artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <test>SomeTest</test>
                    <parallel>classes</parallel>
                    <useUnlimitedThreads>true</useUnlimitedThreads>
                </configuration>

@RunWith(Parameterized.class)
public class SomeTest {
    @Parameterized.Parameters
    public static Iterable<Object[]> data() {
        return Arrays.asList(new Object[][]{{0}, {1}});
    }

    private int x;

    public SomeTest(int x) {
        this.x = x;
    }

    @Test
    public void a() {
        System.out.println("a " + x + " " + Thread.currentThread().getName());
    }

    @Test
    public void b() {
        System.out.println("b " + x + " " + Thread.currentThread().getName());
    }
}

> Parallelization does not work as expected when using jUnit Parameterized
> ------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1082
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1082
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>            Reporter: Bayley Gaillard
>
> I am using jUnit's Parameterized annotation on some Selenium tests to specify 
> the browsers they should run with. I am also using SureFire's new parallel 
> parameter (set to "classes") to try and run them in parallel. However, this 
> is nerfing the parallelization. 
> Let's say I have my parameter list set to Firefox and Chrome, and I have 10 
> test classes. When I execute the tests with Maven, I'm seeing one Firefox 
> window and one Chrome window appear on my remote server at a time. I expected 
> to see 20 windows, 10 Firefox and 10 Chrome: one for each test class with 
> each parameter. 



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

Reply via email to