[ 
https://issues.apache.org/jira/browse/SUREFIRE-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rishabh Arora updated SUREFIRE-1984:
------------------------------------
    Description: 
I need this feature because some testcases need isolated environment to run. I 
have seen that certain testcases fail on an existing fork but seem to run fine 
on a new fork. I want to be able to keep the number of active forks same at all 
times. Just that kill the fork that executes a failed testcase and retry on a 
newly generated fork.

The idea in a nutshell:

{{import org.junit.Assert;
import org.junit.Test;

public class surefireTest {
    private static boolean flag = true;

    @Test
    public void test1() throws InterruptedException {
        Assert.assertTrue(flag);
        flag = false;
        Thread.sleep(40000);
    }

    @Test
    public void test2() throws InterruptedException {
        test1();
    }

    @Test
    public void test3() throws InterruptedException {
        test1();
    }
}}}

 

  was:I need this feature because some testcases need isolated environment to 
run. I have seen that certain testcases fail on an existing fork but seem to 
run fine on a new fork. I want to be able to keep the number of active forks 
same at all times. Just that kill the fork that executes a failed testcase and 
retry on a newly generated fork.


> To be able to kill a fork as soon as a test case fails and start a new fork 
> from the failed testcase, following which subsequent testcases are run. 
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1984
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1984
>             Project: Maven Surefire
>          Issue Type: Wish
>          Components: process forking
>            Reporter: Rishabh Arora
>            Priority: Major
>             Fix For: Backlog
>
>
> I need this feature because some testcases need isolated environment to run. 
> I have seen that certain testcases fail on an existing fork but seem to run 
> fine on a new fork. I want to be able to keep the number of active forks same 
> at all times. Just that kill the fork that executes a failed testcase and 
> retry on a newly generated fork.
> The idea in a nutshell:
> {{import org.junit.Assert;
> import org.junit.Test;
> public class surefireTest {
>     private static boolean flag = true;
>     @Test
>     public void test1() throws InterruptedException {
>         Assert.assertTrue(flag);
>         flag = false;
>         Thread.sleep(40000);
>     }
>     @Test
>     public void test2() throws InterruptedException {
>         test1();
>     }
>     @Test
>     public void test3() throws InterruptedException {
>         test1();
>     }
> }}}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to