maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DM (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SUREFIRE-1373) Tests annotated with @NotThreadSafe are not executed in isolation
Date Fri, 21 Jul 2017 09:34:00 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096056#comment-16096056
] 

DM edited comment on SUREFIRE-1373 at 7/21/17 9:33 AM:
-------------------------------------------------------

Can someone let me know if my below understanding is correct or not after reading the documentation:-

All the classes marked with {{@NotThreadSafe}} runs in a single thread one after another.
This single thread executing {{@NotThreadSafe}} test classes runs after all the threads executing
tests in parallel are finished. 


was (Author: tuk):
What is the behavior are the classes marked with @NotThreadSafe running in a single thread
after the all the parallel executions are finished?

Can someone let me know if my below understanding is correct or not after reading the documentation:-

All the classes marked with {{@NotThreadSafe}} runs in a single thread one after another.
This single thread executing {{@NotThreadSafe}} test classes runs after all the threads executing
tests in parallel are finished. 

> Tests annotated with @NotThreadSafe are not executed in isolation
> -----------------------------------------------------------------
>
>                 Key: SUREFIRE-1373
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1373
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.20
>            Reporter: Sebastian Kirsch
>            Assignee: Tibor Digana
>             Fix For: 2.20.1
>
>
> The [surefire documentation|http://maven.apache.org/components/surefire/maven-failsafe-plugin/examples/fork-options-and-parallel-execution.html]
states that 
> bq. you can apply the JCIP annotation @net.jcip.annotations.NotThreadSafe on the Java
class of JUnit test (pure test class, Suite, Parameterized, etc.) in order to execute it in
single Thread instance. The Thread has name maven-surefire-plugin@NotThreadSafe and it is
executed at the end of the test run.
> However, the thread is run in parallel to the other tests being executed, which contradicts
the documentation and defeats the purpose of running tests sequentially in a single thread.
> See https://github.com/sebastiankirsch/surefire-nonthreadsafe for a test case.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message