Skip to content

Commit 8f74705

Browse files
SarahFaller213bartoszmajsak
authored andcommitted
fix(parallel): uses InheritableThreadLocal for TestNG test runner (#205)
This improves scenarios of parallel execution with TestNG and other Arquillian extensions such as Cube. It does not fix arquillian/arquillian-extension-drone#87 yet.
1 parent e36900c commit 8f74705

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testng/core/src/main/java/org/jboss/arquillian/testng/Arquillian.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
@Listeners(Arquillian.UpdateResultListener.class)
5050
public abstract class Arquillian implements IHookable {
5151
public static final String ARQUILLIAN_DATA_PROVIDER = "ARQUILLIAN_DATA_PROVIDER";
52-
private static ThreadLocal<TestRunnerAdaptor> deployableTest = new ThreadLocal<TestRunnerAdaptor>();
53-
private static ThreadLocal<Stack<Cycle>> cycleStack = new ThreadLocal<Stack<Cycle>>() {
52+
private static InheritableThreadLocal<TestRunnerAdaptor> deployableTest = new InheritableThreadLocal<TestRunnerAdaptor>();
53+
private static InheritableThreadLocal<Stack<Cycle>> cycleStack = new InheritableThreadLocal<Stack<Cycle>>() {
5454
protected java.util.Stack<Cycle> initialValue() {
5555
return new Stack<Cycle>();
5656
}

0 commit comments

Comments
 (0)