Skip to content

Commit 873a078

Browse files
authored
Merge pull request #1305 from shaburov/issue-772.deadlockFix
Fix #772
2 parents 3a88ef8 + 6e0cd26 commit 873a078

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Current
2+
Fixed: GITHUB-772: Severe thread contention while running large test with parallel methods (Shaburov Oleg)
23
Fixed: GITHUB-1298: ITestResult injection is failing in BeforeMethod method (Krishnan Mahadevan)
34
Fixed: GITHUB-1293: Beanshell based execution does not work any more (Krishnan Mahadevan)
45
Fixed: GITHUB-1262: Testcases out of order in XML file in junitreport folder when using testng (Krishnan Mahadevan)

src/main/java/org/testng/internal/thread/graph/GraphThreadPoolExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.io.File;
1010
import java.io.FileWriter;
1111
import java.io.IOException;
12+
import java.util.Collections;
1213
import java.util.List;
1314
import java.util.concurrent.BlockingQueue;
1415
import java.util.concurrent.ThreadFactory;
@@ -26,7 +27,7 @@ public class GraphThreadPoolExecutor<T> extends ThreadPoolExecutor {
2627
private static final boolean DOT_FILES = false;
2728

2829
private DynamicGraph<T> m_graph;
29-
private List<Runnable> m_activeRunnables = Lists.newArrayList();
30+
private List<Runnable> m_activeRunnables = Collections.synchronizedList(Lists.<Runnable>newArrayList());
3031
private IThreadWorkerFactory<T> m_factory;
3132
private List<String> m_dotFiles = Lists.newArrayList();
3233
private int m_threadCount;

0 commit comments

Comments
 (0)